存储过程
1 declare @i int 2 set @i=0 3 begin transaction 4 while @i<80 5 begin 6 set @i=@i+1 7 insert into TabTest values (100+@i, 'Name'+convert(nvarchar(50),@i), @i, dateadd(dd,@i,getdate()) ) 8 end 9 commit 10 go 11 12 select * from tabtest 13 go
1 declare @i int 2 set @i=0 3 begin transaction 4 while @i<80 5 begin 6 set @i=@i+1 7 insert into TabTest values (100+@i, 'Name'+convert(nvarchar(50),@i), @i, dateadd(dd,@i,getdate()) ) 8 end 9 commit 10 go 11 12 select * from tabtest 13 go