commit

Commit transaction's changes to the database

Syntax

commit_stmt:
          COMMIT [WORK]

Description

The COMMIT statement causes all database modifications that have been made since the beginning of the transaction to be permanently written to the database. Upon successful return the transaction's changes are guaranteed to be in the database and all locks are freed.

A transaction is explicitly started through execution of a START TRANSACTION statement or implicitly through the execution of the first database modification statement (INSERT, UPDATE, or DELETE). It is recommended that you always use the START TRANSACTION statement to mark the beginning of a transaction.

RDM SQL also provides the ability to run in auto-commit mode in which each INSERT, UPDATE, and DELETE statement is automatically committed. This mode is made available to support some third-party ODBC tools. However, the use of auto-commit mode is not recommended as transactions are designed to allow the grouping of related database changes and that is not possible when running with auto-commit enabled.

Execution of a COMMIT statement when a transaction is not currently active will free all of the read locks held by the connection.

Example

start transaction;
    ... insert, update, and/or delete statements
commit;

See Also

START TRANSACTION

ROLLBACK