declare @i int set @i=1 while @i<30 begin insert into test (userid) values(@i) set @i=@i+1 end
原文转自:http://www.ltesting.net