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‘[email protected],‘Jack‘+ltrim(@n),‘男‘,22,‘上海‘,‘18272986984‘,‘上海‘) set @n=@n+1 END go EXEC pp; go drop procedure pp;
时间: 2024-10-10 18:51:01