ZetaSQL supports the following transaction statements.
BEGIN [TRANSACTION][ISOLATION LEVEL isolation_level];
Begins a transaction.
This statement supports an optional ISOLATION LEVEL
clause. Following are the
standard values for isolation_level
:
READ UNCOMMITTED
READ COMMITTED
REPEATABLE READ
SERIALIZABLE
Example
The following example begins a transaction using the READ COMMITTED
isolation
level.
BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
START TRANSACTION [ISOLATION LEVEL isolation_level]
Synonymous with BEGIN
.
COMMIT [TRANSACTION];
Commits a transaction.
ROLLBACK [TRANSACTION];
Rolls back a transaction.