ROLLBACK Statement

Undoes any changes made since the last COMMIT or ROLLBACK.

Syntax

ROLLBACKWORK ]

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

Standards

  • SQL—ISO/ANSI SQL compliant.

  • Sybase—Supported by Adaptive Server Enterprise.

Permissions

Must be connected to the database.

Related reference
COMMIT Statement
ROLLBACK TO SAVEPOINT Statement