ROLLBACK
Rolls back a transaction or to a savepoint
DSQL, ESQL
ROLLBACK [TRANSACTION tr_name] [WORK]
[RETAIN [SNAPSHOT] | RELEASE]
| ROLLBACK [WORK] TO [SAVEPOINT] sp_name
| Parameter | Description |
|---|---|
tr_name |
Transaction name.Available only in ESQL |
sp_name |
Savepoint name.Available only in DSQL |
The ROLLBACK statement rolls back all work carried out in the context of this transaction (inserts, updates, deletes, selects, execution of procedures).ROLLBACK never fails and, thus, never causes exceptions.Unless the RETAIN clause is employed, all server resources allocated to the work of the transaction are released.
The TRANSACTION and RELEASE clauses are only valid in ESQL.The ROLLBACK TO SAVEPOINT statement is not available in ESQL.