SAVEPOINT Statement

Establishes a savepoint within the current transaction.

Syntax

SAVEPOINTsavepoint-name ]

Usage

The savepoint-name is an identifier that can be used in a RELEASE SAVEPOINT or ROLLBACK TO SAVEPOINT statement.

All savepoints are automatically released when a transaction ends. See System Administration Guide: Volume 2 > Using Procedures and Batches.

Savepoints that are established while a trigger is executing or while an atomic compound statement is executing are automatically released when the atomic operation ends.

Standards

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Not supported in Adaptive Server Enterprise. To implement similar features in an Adaptive Server Enterprise-compatible manner, use nested transactions.

Permissions

None

Related reference
RELEASE SAVEPOINT Statement
ROLLBACK TO SAVEPOINT Statement