Skip to main content

RELEASE SAVEPOINT (bSQL) | Blockpoint Docs

Releases a savepoint in the current transaction.

bSQL Syntax Conventions.

Syntax

RELEASE SAVEPOINT savepoint_name

Arguments

savepoint_name
The name of the savepoint to be released from memory.

Examples

A. Releasing a Savepoint.

The following illustrates the effect of releasing a savepoint. After the first SAVEPOINT is created, it is released, and recreated after the first insertion. Now the effect of rolling back to said savepoint will only rollback the final insertion.

This example uses the Financial Demo Database.

START TRANSACTION
    SET AUTOCOMMIT = 0
INSERT financial.companies 
VALUES ("WPG", "Washington Prime Group", "Trust")
SAVEPOINT "savepoint"
INSERT financial.companies VALUES 
("POLA", "Polar Power, Inc", "Industrial")
RELEASE SAVEPOINT "savepoint"
SAVEPOINT "savepoint"
INSERT financial.companies VALUES 
("WPG", "Washington Prime Group", "Trust")
ROLLBACK TO "my first savepoint"

See Also