COMMIT
statementsupportedQueries & DMLCommits an open transaction in the current session.
Syntax
supportedpartialnot supportednot scored
COMMIT [ WORK ]
Parameters
| Name | Required | Description |
|---|---|---|
WORK | Optional keyword that provides compatibility with other database systems. |
Usage notes
- If two COMMIT statements in a row are executed (within the same scope), the second one is ignored. For example, in the following code, the second COMMIT has no effect; there is no open transaction to commit. Copy code BEGIN; INSERT INTO table1 ...; COMMIT; COMMIT; -- Ignored! The rules can be more complex if you are using autonomous scoped transactions and stored procedures.