Start a transaction.


Syntax

<start transaction statement> ::= START TRANSACTION [ <transaction mode> ]

<transaction mode> ::=

|

SNAPSHOT

SERIALIZABLE


Usage

The START TRANSACTION statement starts a new transaction in the current session.


Notes

An isolation level of SERIALIZABLE is implicit if a transaction mode is not specified.
SNAPSHOT defines a read-only transaction with SERIALIZABLE isolation level. Since SNAPSHOT transactions don't put any locks on the tables involved in the transaction, SERIALIZABLE transactions from other sessions may change data while the SNAPSHOT transaction is active.
All SQL statements between a START TRANSACTION statement and a COMMIT or ROLLBACK statement will be part of the transaction.
If an error occurs during the execution of any following SQL statements, then the transaction is aborted and no changes are updated in the database.
Schema statements (DDL) are executed under control of an internal transaction, and shall not be specified in the context of an explicit transaction.


Examples

1) The following example starts a new transaction:

       START TRANSACTION;

2) The following example starts a new snapshot transaction:

       START TRANSACTION SNAPSHOT;


Conformance

SQL:2003 standard

NexusDB extensions

-

-

-

Feature T241 "START TRANSACTION statement"

Transaction access mode is not supported.

SNAPSHOT

Home | Site Contents | Documentation | NexusDB Manual V4 | SQL Reference | SQL Statements | Transaction Statements