602SQL Documentation Index  

SET TRANSACTION Statement

statement_SET_TRANSACTION ::= SET TRANSACTION [ isolation ] [, transaction_type ]  
isolation ::= ISOLATION LEVEL { READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE }
transaction_type ::= READ ONLY | READ WRITE

The SET TRANSACTION statement sets the properties of a default transaction. This specifies the transaction type and the isolation level from other running transactions. This setting applies to all future transactions until a new setting is applied.

If the isolation is not specified, SERIALIZABLE level will be assumed. If the transaction type is not specified, then READ ONLY will be assumed if the isolation level is READ UNCOMMITTED, otherwise READ WRITE will be used.

If this statement is executed when an explicit transaction is already in progress, the error sqlstate 25001 occurs.

The 602SQL Server internally implements the READ COMMITTED and SERIALIZABLE isolation levels only. When you set READ UNCOMMITTED level, READ COMMITTED is set internally. When you set REPEATABLE READ level, SERIALIZABLE is set internally. This behaviour does not violate the SQL standard.

Variations from the SQL Standard