SQL Reference

SAVEPOINT

Use the SAVEPOINT statement to set a savepoint within a transaction.

Invocation

This statement can be imbedded in an application program (including a stored procedure) or issued interactively. It is an executable statement that can be dynamically prepared.

Authorization

None required.

Syntax

>>-SAVEPOINT--savepoint-name----+---------+--------------------->
                                '-UNIQUE--'
 
                                 .-ON ROLLBACK RETAIN LOCKS--.
>----ON ROLLBACK RETAIN CURSORS--+---------------------------+--><
 

Description

savepoint-name
Name of the savepoint.

UNIQUE
Specifying a UNIQUE savepoint indicates that the application does not intend to reuse this savepoint name while the savepoint is active.

ON ROLLBACK RETAIN CURSORS
Specifies system behavior upon rollback to this savepoint with respect to open cursor statements processed after the SAVEPOINT statement. The RETAIN CURSORS clause indicates that, whenever possible, the cursors are unchanged by a rollback to savepoint. For situations where the cursors are affected by the rollback to savepoint, see ROLLBACK.

ON ROLLBACK RETAIN LOCKS
Specifies system behavior upon rollback to this savepoint with respect to locks acquired after the setting of the savepoint. Locks acquired since the savepoint are not tracked and are not rolled back (released) on rollback to the savepoint.

Rules

Notes


[ Top of Page | Previous Page | Next Page ]