7.5.26 SAVEPOINT

Table of Contents Previous Next


7 Reference : 7.5 ECPGPlus Statements : 7.5.26 SAVEPOINT

7.5.26 SAVEPOINT
Use the SAVEPOINT statement to define a savepoint; a savepoint is a marker within a transaction. You can use a ROLLBACK statement to abort the current transaction, returning the state of the server to its condition prior to the specified savepoint. The syntax of a SAVEPOINT statement is:
EXEC SQL [AT database_name] SAVEPOINT savepoint_name
database_name is the database identifier or a host variable that contains the database identifier against which the savepoint resides. If you omit the AT clause, the statement will execute against the current default database.
savepoint_name is the name of the savepoint. If you re-use a savepoint_name, the original savepoint is discarded.
To create a savepoint named my_savepoint, include the statement:

7 Reference : 7.5 ECPGPlus Statements : 7.5.26 SAVEPOINT

Table of Contents Previous Next