alter procedure test as
DECLARE @a int=0 ,@b int =10;
while @a<@b
begin
-- 字符串拼接数字
insert testTable select 'ID测试测试'+convert(varchar(50),@a),'name测试测试'+convert(varchar(50),@b);
set @a=@a+1;
end
EXEC test
转载于:https://www.cnblogs.com/liyunchuan/p/11177329.html