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

RELEASE SAVEPOINT statement

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

Most dialects support the SAVEPOINT statement. Instead of committing savepoints (which act as nested transactions, a SAVEPOINT can be released using the RELEASE SAVEPOINT statement, when it is no longer needed.

Dialect support

This example using jOOQ:

releaseSavepoint("s")

Translates to the following dialect specific expressions:

Aurora Postgres, BigQuery, CockroachDB, DB2, Firebird, H2, HSQLDB, Hana, Informix, MariaDB, MemSQL, MySQL, Oracle, Postgres, SQLite, YugabyteDB

RELEASE SAVEPOINT s

SQLDataWarehouse, SQLServer

BEGIN
  IF 1 = 0 SELECT 1;
END;

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

/* UNSUPPORTED */

(These are currently generated with jOOQ 3.20, 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