Rolls back the current transaction and backs out all updates in the transaction.
ROLLBACK backs out of all changes that a transaction makes to a database if the transaction fails to be executed due to a fault.
If a ROLLBACK statement is executed out of a transaction, no error occurs, but a warning information is displayed.
1 | ROLLBACK [ WORK | TRANSACTION ]; |
WORK | TRANSACTION
Optional keyword that more clearly illustrates the syntax.
Undo all changes in the current transaction.
1 | ROLLBACK; |