主题:[原创]批量录入数据到数据库中
/*declare @counter int
declare @empid int
set @counter=0
set @empid=11110000
while (@empid<11119000)
begin
insert into esd_employee (empid,empname,depname,zjitem,cardid,mjid,ntest,cwrist,cfoot,remark,cother,vipmark,newmark) values (11110000,'王生',null,null,null,'ALL',1,0,0,null,null,null,null)
set @empid=@empid+1
set @counter=@counter+1
end
go*/
为什么不行,只能录入一条,如果要可以,应该怎么做.
declare @empid int
set @counter=0
set @empid=11110000
while (@empid<11119000)
begin
insert into esd_employee (empid,empname,depname,zjitem,cardid,mjid,ntest,cwrist,cfoot,remark,cother,vipmark,newmark) values (11110000,'王生',null,null,null,'ALL',1,0,0,null,null,null,null)
set @empid=@empid+1
set @counter=@counter+1
end
go*/
为什么不行,只能录入一条,如果要可以,应该怎么做.