Syntax
The ROLLBACK statement has the following format:
[EXEC SQL] ROLLBACK [WORK] [TO savepoint_name];
TO savepoint_name
Rolls back only those changes made after the specified savepoint. The transaction is not terminated. Processing resumes with the statement following the ROLLBACK TO savepointname statement. If autocommit is enabled, the ROLLBACK statement has no effect.
If ROLLBACK is issued without the optional TO clause, the statement terminates the transaction and rolls back any changes made by the transaction.
WORK
Is an optional keyword included for compatibility with the ISO and ANSI SQL standards.