Command BEGIN TRANSACTION Foundation

Begins a transaction.

Syntax
BEGIN TRANSACTION
Description

BEGIN TRANSACTION opens a new transaction. A transaction is a logical unit containing an arbitrary sequence of database operations which must be executed together (or not at all). When records are modified in a table that is part of a transaction, other users on the network do not have access to the records until the transaction is ended. Note that the behaviour in terms of concurrent database access depends on the database backend or database engine being used. For example, SQL backends typically employ versioning schemes which allow other users to operate on their own copies of the records which are affected by a transaction.

Transactions can be nested. The END TRANSACTION command ends a transaction and commits the changes made at the current transaction level. In addition, the operations which were performed after a transaction is begun can be reverted using the ROLLBACK command.

Transactions are supported only for tables in databases.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.