All Products
Search
Document Center

PolarDB:COMMIT

Last Updated:Mar 28, 2026

COMMIT ends the current transaction and makes all changes permanent. After a commit:

  • All changes become visible to other sessions.

  • Changes are durable and survive system crashes.

Synopsis

COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]

Parameters

ParameterDescription
WORK | TRANSACTIONOptional keywords with no effect.
AND CHAINImmediately starts a new transaction with the same characteristics as the one just committed. See SET TRANSACTION for details.

Usage notes

  • Issuing COMMIT outside a transaction raises a warning but causes no harm.

  • COMMIT AND CHAIN outside a transaction is an error.

  • To roll back a transaction instead of committing it, use ROLLBACK.

Example

Commit the current transaction and make all changes permanent:

COMMIT;

See also