H2 Database - Savepoint


Advertisements


SAVEPOINT is a command used to temporarily save the transaction. It is better to maintain savepoints in your transaction as it is helpful to roll back the transaction to the respective Savepoint whenever necessary.

Syntax

Following is the generic syntax of the Savepoint command.

SAVEPOINT savepointName

Example

In this example, we will create a Savepoint named Half_Done using the following command.

SAVEPOINT Half_Done; 

The above command produces the following output.

Savepoint created


Advertisements