ALLBASE/SQL Reference Manual (36216-90216)

546 Chapter12
SQL Statements S - Z
SET TRANSACTION
started on behalf of the user inherits the most recent transaction attributes of the old
transaction. However, the KEEP cursor(s) inherit the isolation level attribute of the old
transaction at the time the cursor(s) were opened. For example:
BEGIN WORK RC
.
.
.
OPEN C1 KEEP CURSOR ...
.
.
.
SET TRANSACTION ISOLATION LEVEL CS
.
.
.
OPEN C2 KEEP CURSOR ...
.
.
.
SET TRANSACTION ISOLATION LEVEL RU
.
.
.
COMMIT WORK
.
.
.
OPEN C3
.
.
.
In the above example, the new transaction started on behalf of the user after the
COMMIT WORK has isolation level RU; cursor C1 has isolation RC; cursor C2 has isolation
level CS; and cursor C3 has isolation level RU.
The SET TRANSACTION statement is not allowed within a stored procedure.
Authorization
You do not need authorization to use the SET TRANSACTION statement.