ROLLBACK statement

Description

Undoes any changes made since the last COMMIT or ROLLBACK.

Syntax

ROLLBACK [ WORK ]

Usage

ROLLBACK ends a logical unit of work (transaction) and undoes all changes made to the database during this transaction. A transaction is the database work done between COMMIT or ROLLBACK statements on one database connection.


Side effects

Closes all cursors not opened WITH HOLD.

Releases locks held by the transaction issuing the ROLLBACK.

Standards

Permissions

Must be connected to the database.

See also

COMMIT statement

ROLLBACK TO SAVEPOINT statement