可以在SQL Server的查询分析器上执行以下循环写入的代码:
declare @i int set @i=1 while @i<30 begin insert into test (userid) values(@i) set @i=@i+1 end