This document covers the following topics:
For an explanation of the symbols used in the syntax diagram, see Syntax Symbols.
Belongs to Function Group: Database Access and Update
See also ROLLBACK - SQL in the Natural for DB2 part of the Database Management System Interfaces documentation:
The SQL statement
ROLLBACK corresponds to the Natural
TRANSACTION. It undoes all database modifications made since
the beginning of the last recovery unit. A recovery unit may start either after
the beginning of a session or after the last
END TRANSACTION or
statement. This statement also releases all records held during the
If a program tries to backout updates which have already been committed by a terminal I/O, a corresponding Natural error message (NAT3711) is returned.
As all cursors are closed when a logical unit of work ends, a
If an external program written in another standard programming
language is called from a Natural program, this external program should not
contain its own
ROLLBACK statement if the Natural program issues
database calls, too. The calling Natural program should issue the
ROLLBACK statement on behalf of the external program.
... DELETE FROM SQL-PERSONNEL WHERE NAME = 'SMITH' ROLLBACK ...