ALLBASE/SQL Reference Manual (36216-90216)

544 Chapter12
SQL Statements S - Z
SET TRANSACTION
DEFERRED specifies that constraint errors are not checked until the constraint
checking mode is reset to IMMEDIATE or the current transaction ends.
IMMEDIATE specifies that constraint errors are checked when a statement executes.
This is the default.
STATEMENT specifies that error checking occurs at the statement level. This is the
default.
ROW specifies that error checking occurs at the row level.
QUERY sets the action for timeouts or deadlocks to rollback the statement or
query.
TRANSACTION sets the action for timeouts or deadlocks to rollback the transaction.
DEFAULT specifies to use the default timeout duration for the DBE specified in the
START DBE statement.
MAXIMUM specifies to use the maximum timeout duration for the DBE specified in
the START DBE statement.
TimeoutValue
specifies the timeout duration to use in seconds or minutes.
:HostVariable4
is an integer host variable specifying the timeout duration to use in
seconds or minutes.
SESSION specifies self-termination at the session level, and allows external
termination at the session level only.
TRANSACTION specifies self-termination at the transaction level, and allows external
termination at the session or transaction level.
QUERY specifies self-termination at the query level, and allows external
termination at the session, transaction, or query level.
RESTRICTED specifies no self-termination, and allows external termination at the
session level only. This is the default.
Description
Detailed information about isolation levels is presented in the "Concurrency Control
through Locks and Isolation Levels" chapter.
You can issue the SET TRANSACTION statement at any point in an application or ISQL
session. If the SET TRANSACTION statement is issued outside of an active transaction,
its attribute(s) apply to the next transaction. If issued within a transaction, its
attribute(s) apply to the current transaction.
Within a transaction, any attribute specified in a SET TRANSACTION statement
remains in effect until the transaction terminates or until reset by another statement
issued within the transaction. See Chapter 2 , “Using ALLBASE/SQL,” "Scoping of
Transaction and Session Attributes" section for information about statements used to
set transaction attributes.
When using RC or RU, you should verify the existence of a row before you issue an
UPDATE statement. In application programs that employ cursors, you can use the