COMMIT

Name

COMMIT  --  Commits the current transaction

Synopsis

COMMIT [ WORK | TRANSACTION ]
  

Inputs

WORK

Optional keyword. Has no effect.

TRANSACTION

Optional keyword. Has no effect.

Outputs

COMMIT

Message returned if the transaction is successfully committed.

NOTICE: COMMIT: no transaction in progress

Message returned if there is no transaction in progress.

Description

COMMIT commits the current transaction. All changes made by the transaction become visible to others and are guaranteed to be durable if a crash occurs.

Notes

Use ROLLBACK to abort a transaction.

Usage

To make all changes permanent:
BEGIN WORK;  –– start a chained transaction
/* Do some work */
COMMIT WORK; –– commit the transaction

Compatibility

SQL92

SQL92 specifies only the two forms COMMIT and COMMIT WORK.