Accepting Changes

From InterBase
Jump to: navigation, search

Go Up to Closing Transactions


The COMMIT statement ends a transaction, makes the transaction’s changes available to other users, and closes cursors. A COMMIT is used to preserve changes when all of a transaction’s operations are successful. To end a transaction with COMMIT, use the following syntax:

EXEC SQL
COMMIT TRANSACTION name;

For example, the following statement commits a transaction named MYTRANS:

EXEC SQL
COMMIT TRANSACTION MYTRANS;

For a complete discussion of SQL transaction control, see Working with Transactions.