标签:ar sp 数据 art bs ef as nbsp har
DECLARE @Start INT = 1; --开始
DECLARE @Digits INT = 6; --后几位
DECLARE @prefix VARCHAR(50) = ‘0990‘;--前缀
DECLARE @end INT=500000; --结束
SET @Start = 1
WHILE @Start < @end
BEGIN
INSERT INTO Test
( TId )
VALUES ( @prefix+ REPLICATE(‘0‘,@Digits - DATALENGTH(CAST(@Start AS VARCHAR(50)))) + CAST(@Start as VARCHAR(50)) )
SET @Start = @Start + 1
END
标签:ar sp 数据 art bs ef as nbsp har
原文地址:http://www.cnblogs.com/BugGod/p/4146719.html