Thursday, 10 November 2011

What is Difference between Commit and Rollback when Used in Transactions?



The usual structure of the TRANSACTION is as follows:
BEGIN TRANSACTION
Operations
COMMIT TRANSACTION or ROLLBACK TRANSACTION
When Commit is executed, every statement between BEGIN and COMMIT becomes persistent to database. When Rollback is executed, every statement between BEGIN and ROLLBACK are reverted to the state when BEGIN was executed.

No comments:

Post a Comment


”Back