COMMIT

COMMIT — commit the current transaction

Syntax

COMMIT [ WORK ]

Description

COMMIT commits the current transaction. All changes made by the transaction become visible to others and are guaranteed to be durable even if an unexpected termination in service occurs.

Caution: If a transaction fails on commit due to a system error, it is left in a failed state. If a client tries to execute a new statement in that transaction, an error is returned.

Parameters

Example

SET AUTOCOMMIT OFF;
CREATE TABLE tab1 (column1 STRING);
INSERT INTO tab1 VALUES ('row1');
COMMIT;          /* Use ROLLBACK instead to rollback the transaction */
SET AUTOCOMMIT ON;