The ROLLBACK statement is used to end a unit of work and to back out the database changes that were made by that unit of work. All changes made by ALTER, CALL, COMMENT ON, CREATE, DELETE, DROP (except for DROP SCHEMA), GRANT, INSERT, LABEL ON, RENAME, REVOKE, and UPDATE statements executed during the unit of work are backed out or rolled back to a savepoint if a savepoint was specified.
You can specify WORK or HOLD on the ROLLBACK statement. ROLLBACK WORK as the same effect as ROLLBACK. ROLLBACK HOLD indicates a hold on resources. If specified, currently open cursors are not closed and all resources acquired during the unit of work, except locks on the rows of tables, are held. Locks on specific rows implicitly acquired during the unit of work, however, are released. This statement does not affect commitment operations that are performed with COMMIT(*NONE) commitment control.
Delete all of the changes made since the last commit point or rollback.
ROLLBACK WORK
Delete all of the changes made back to savepoint SAVEPOINT1.
ROLLBACK TO SAVEPOINT SAVEPOINT1
For more information, see ROLLBACK in the SQL Reference topic in the
Information Center.