Available in versions: Dev (3.19) | Latest (3.18)

SAVEPOINT statement

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

Most dialects support the SAVEPOINT statement, which allows for applying a marker in the middle of a transaction, to which the transaction can rollback using the ROLLBACK TO SAVEPOINT statement

Dialect support

This example using jOOQ:

savepoint("s")

Translates to the following dialect specific expressions:

-- AURORA_POSTGRES, BIGQUERY, COCKROACHDB, FIREBIRD, H2, HANA, HSQLDB, INFORMIX, MARIADB, MEMSQL, MYSQL, ORACLE, POSTGRES, 
-- SQLITE, YUGABYTEDB
SAVEPOINT s

-- DB2
SAVEPOINT s ON ROLLBACK RETAIN CURSORS

-- SQLDATAWAREHOUSE, SQLSERVER
SAVE TRANSACTION s

-- ACCESS, ASE, AURORA_MYSQL, DERBY, DUCKDB, EXASOL, REDSHIFT, SNOWFLAKE, SYBASE, TERADATA, TRINO, VERTICA
/* UNSUPPORTED */

(These are currently generated with jOOQ 3.19, see #10141), or translate your own on our website

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo