标签:
create proc pp as declare @n int set @n=1 while @n<=100 begin insert into student values(‘11341101320‘+LTRIM(@n),‘Jack‘+ltrim(@n),‘男‘,22,‘上海‘,‘18272986984‘,‘上海‘) --ltrim(@n) 转成字符串 拼接学号 --insert into student values(‘1134110120‘+@n,‘Jack‘+ltrim(@n),‘男‘,22,‘上海‘,‘18272986984‘,‘上海‘) set @n=@n+1 END go EXEC pp; go drop procedure pp;
标签:
原文地址:http://www.cnblogs.com/thrive/p/4191961.html