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
| Parameter | Description |
|---|---|
WORK | TRANSACTION | Optional keywords with no effect. |
AND CHAIN | Immediately starts a new transaction with the same characteristics as the one just committed. See SET TRANSACTION for details. |
Usage notes
Issuing
COMMIToutside a transaction raises a warning but causes no harm.COMMIT AND CHAINoutside 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;