/* Author: Hemantgiri S. Goswami Date: 11/09/2007 Des.: This script illustrate the way to perform large DML transactions in smaller chunk to avoid T-Log growth significantly. */ create table tblloop ( sid int identity(1,1) primary key, fname varchar(10) ) go -- This will insert 1000 records in table tblloop declare @ctr int set @ctr=0 -- Here you can have @@rowcount output instead of 1000 and so on!! while (@ctr < 1000) begin insert into tblloop values('Hemant') set @ctr= @ctr+1 print @ctr continue break end go select * from tblloop go drop table tblloop go