DB2 Version 9.7 for Linux, UNIX, and Windows

SQLJ SET-TRANSACTION-clause

The SET TRANSACTION clause sets the isolation level for the current unit of work.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-SET TRANSACTION--ISOLATION LEVEL--+-READ COMMITTED---+------><
                                     +-READ UNCOMMITTED-+   
                                     +-REPEATABLE READ--+   
                                     '-SERIALIZABLE-----'   

Description

ISOLATION LEVEL
Specifies one of the following isolation levels:
READ COMMITTED
Specifies that the current isolation level is cursor stability.
READ UNCOMMITTED
Specifies that the current isolation level is uncommitted read.
REPEATABLE READ
Specifies that the current isolation level is read stability.
SERIALIZABLE
Specifies that the current isolation level is repeatable read.

Usage notes

You can execute SET TRANSACTION only at the beginning of a transaction.