SAVEPOINT

From InterBase

Go Up to Statement and Function Reference (Language Reference Guide)


SAVEPOINT <savepoint_name>

Description: A savepoint allows a transaction to be partially rolled back. Updates that are made after a named savepoint is established can be rolled back by issuing a ROLLBACK command of the following form:

ROLLBACK [TRANSACTION transaction_name] TO SAVEPOINT savepoint_name;

If no transaction name is specified, the default transaction is used.

A savepoint name can be any valid SQL identifier. Savepoint names must be unique within their atomic execution context. If you assign a name that is already in use, the existing savepoint is released and the name is applied to the current savepoint. An application, for example, is an execution context, as is each trigger and stored procedure. Thus, if you have an application with several triggers, you can have a savepoint named SV1 within the application and also within each trigger and stored procedure.

See Also

Advance To: