START TRANSACTION starts a transaction. If the isolation level, read/write mode, or deferrable mode is specified, a new transaction will have those characteristics. You can also specify them using SET TRANSACTION.
None
Format 1: START TRANSACTION
1 2 3 4 5 6 7 | START TRANSACTION [ { ISOLATION LEVEL { READ COMMITTED | READ UNCOMMITTED | SERIALIZABLE | REPEATABLE READ } | { READ WRITE | READ ONLY } } [, ...] ]; |
Format 2: BEGIN
1 2 3 4 5 6 7 | BEGIN [ WORK | TRANSACTION ] [ { ISOLATION LEVEL { READ COMMITTED | READ UNCOMMITTED | SERIALIZABLE | REPEATABLE READ } | { READ WRITE | READ ONLY } } [, ...] ]; |
Optional keyword in BEGIN format without functions.
Specifies the transaction isolation level that determines the data that a transaction can view if other concurrent transactions exist.
The isolation level of a transaction cannot be reset after the first clause (INSERT, DELETE, UPDATE, FETCH, COPY) for modifying data is executed in the transaction.
Valid value:
Specifies the transaction access mode (read/write or read only).
1 2 3 | START TRANSACTION; SELECT * FROM tpcds.reason; END; |
1 2 3 | START TRANSACTION ISOLATION LEVEL READ COMMITTED READ WRITE; SELECT * FROM tpcds.reason; COMMIT; |