sql的padleft
/* SELECT dbo.fn_PadLeft('8', '0', 6) */ create function fn_PadLeft(@num nvarchar(16),@paddingChar char(1),@totalWidth int) returns nvarchar(16) as begin declare @curStr nvarchar(16) select @curStr = isnull(replicate(@paddingChar,@totalWidth - len(isnull(@num ,0))), '') + @num return @curStr end
生活没有输赢,不要在乎别人如何评价你,开心就好。
QQ群:158138959