通过SQL把n条记录插入表中

 

这里插入20000条

--插入数据 
 set identity_insert TestTable on 
 declare @count int 
 set @count=1 
 while @count<=20000
 begin  
     insert into tb_TestTable(id,Name) values(@count,'admin'
     set @count=@count+1 
 end 
set identity_insert tb_TestTable off

原文地址:https://www.cnblogs.com/liuhaitao/p/1323096.html