Available in versions: Dev (3.20) | Latest (3.19) | 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, HSQLDB, Hana, Informix, MariaDB, MemSQL, MySQL, Oracle, Postgres, SQLite, YugabyteDB

SAVEPOINT s

DB2

SAVEPOINT s ON ROLLBACK RETAIN CURSORS

SQLDataWarehouse, SQLServer

SAVE TRANSACTION s

ASE, Access, Aurora MySQL, ClickHouse, Derby, DuckDB, Exasol, Redshift, Snowflake, Sybase, Teradata, Trino, Vertica

/* UNSUPPORTED */
Generated with jOOQ 3.20. Translate your own SQL on our website

Feedback

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

The jOOQ Logo