Undo a transaction, completely or to a savepoint.
Syntax
ROLLBACK TRAN[SACTION [option] [;]
ROLLBACK [WORK] [;]
Options
transaction
@tranaction_variable
savepoint
@savepoint_variable
Key
Transaction Name assigned to the transaction on BEGIN TRANSACTION.
@Transaction User-defined variable containing a valid transaction name.
savepoint Savepoint name from a SAVE TRANSACTION statement.
@savepoint_var User-defined variable containing a valid savepoint name.
WORK SQL 92 Compatibility
A transaction cannot be rolled back after COMMIT TRANSACTION is executed.
Example
ROLLBACK;
"All that is gold does not glitter, Not all those who wander are lost;" ~ J. R. R. Tolkien
Related commands:
COMMIT
Equivalent Oracle command: ROLLBACK