declare @i int,@index int
set @i=1
set @index=0
while @i<1000000
begin
set @index=@index+1
declare @age int
set @age=
insert into stu(name,age,sno) values('李四',@age,'SN'+convert(varchar,@i))
set @i=@i+1
if(@index>100)
set @index=0
end
以上语句为循环插入多条记录,sql数据库
如有错误,还望指出,tks