ROLLBACK
The ROLLBACK statement aborts the current transaction.
General format
EXEC SQL [ AT Database ] ROLLBACK { WORK } [ RELEASE ] { TRAN } { TRANSACTION } END-EXEC |
General Rules
1. Database identifies the active connection that will execute the query and must be previously defined using a Format 4
DECLARE statement.
2. WORK, TRAN and TRANSACTION are synonymous and are assumed if omitted.
3. The RELEASE option frees all resources (locks and cursors) held by the program and logs off the database.
Examples
Rollback transaction
exec sql rollback work end-exec |