Transaction Conceptplustcpip
Transaction Conceptplustcpip
Tarun Thakur
Single-User Vs. Multi-User System
Eg.:-
COMMIT
COMMIT WORK
COMMIT COMMENT ‘Student Record’
COMMIT WORK COMMENT ‘Student Record’
ROLLBACK an entire
transaction
• All changes made by the current transaction
are undone
• All locks on rows caused by transaction are
released
• Transaction is ended
ROLLBACK to a savepoint
• Only the SQL statements executed after last
savepoint is rolled back
• The specified savepoint in the ROLLBACK
command is preserved , but all other
savepoints after that savepoints are removed
from database
• All locks established since the specified
savepoint are released
• The transaction is still active and can continue
Syntax ROLLBACK
ROLLBACK [WORK]
[TO[SAVEPOINT]<savepoint>]