The ROLLBACK statement is used to terminate a unit of work and back out the database changes that were made by that unit of work.
Invocation
This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared.
Authorization
None required.
Syntax
.-WORK--. >>-ROLLBACK----+-------+--------------------------------------->< |
The unit of work in which the ROLLBACK statement is executed is terminated and a new unit of work is initiated. All changes made to the database during the unit of work are backed out.
The following statements, however, are not under transaction control and changes made by them are independent of issuing the ROLLBACK statement:
Example
Delete the alterations made since the last commit point or rollback.
ROLLBACK WORK