Navigation:  NexusDB Guide > SQL Reference > SQL Statements > Transaction Statements >

START TRANSACTION statement

Previous pageReturn to chapter overviewNext page

NexusDB V3 Manual

START TRANSACTION statement

button_main button_prev button_next

NexusDB Manual V3 > SQL Reference > SQL Statements > Transaction Statements

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

 

© Nexus Database Systems Pty Ltd.

nexus_logo