QUEL Reference Guide > QUEL Reference Guide > QUEL and EQUEL Statements > SAVEPOINT--Declare Marker in an MQT
Was this helpful?
SAVEPOINT--Declare Marker in an MQT
Valid in: QUEL, EQUEL
Declares a savepoint marker within a multi-query transaction.
This statement has the following format:
[##] savepoint savepoint_name
The savepoint statement declares a savepoint within a multi-query transaction (MQT). Savepoints are used in conjunction with the abort statement. Abort allows you to specify a savepoint. An abort to that savepoint undoes all updates performed between the savepoint and the abort statement. Savepoint_name must be a valid, unquoted object name. Declaring a savepoint closes any open cursors.
There is no limit to the number of savepoints that you can declare within an MQT. You can use the same savepoint_name more than once. However, only the most recently declared use of a savepoint_name is active within the MQT. In other words, if you abort to a savepoint whose name is used more than once, the transaction is backed out to the most recent use of the savepoint_name.
All savepoints within a transaction are rendered inactive when the transaction is terminated (either committed with end transaction, or aborted with abort or by the system as the result of deadlock or timeout).
For more information on transactions, see Transactions and ABORT--Undo an MQT.
Last modified date: 08/14/2024