How Can we Write the Transaction Block in SQL Server?

 Posted by Lakhangarg on 8/25/2009 | Category: Sql Server Interview questions | Views: 7130
Answer:

BEGIN TRANSACTION

Statement 1
Statement 2
..................
...............
IF(@ERROR>0)
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response