Hi all,
What is difference between these two styles of TSQL code:
WHILE 1...to...1000
BEGIN
INSERT ... VALUES(...)
END
----------------------
BEGIN TRAN
WHILE 1...to...1000
BEGIN
INSERT ... VALUES(...)
END
COMMIT TRAN
-----------
The second with BEGIN TRAN is executed very very faster than the first one.
What's the reason?
Many thanks in advance
Leila