0% found this document useful (0 votes)
8 views1 page

Set Constraint

The SET CONSTRAINTS statement allows users to define when deferrable constraints are checked during a transaction, either immediately after each DML statement or when the transaction is committed. This mode can be set for specific constraints or all constraints and lasts until changed by another SET CONSTRAINTS statement. Additionally, it can be used in conjunction with ALTER SESSION and is applicable in distributed transactions, with certain privileges required for its use.

Uploaded by

Venkat Kv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Set Constraint

The SET CONSTRAINTS statement allows users to define when deferrable constraints are checked during a transaction, either immediately after each DML statement or when the transaction is committed. This mode can be set for specific constraints or all constraints and lasts until changed by another SET CONSTRAINTS statement. Additionally, it can be used in conjunction with ALTER SESSION and is applicable in distributed transactions, with certain privileges required for its use.

Uploaded by

Venkat Kv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

SET CONSTRAINT[S]

Purpose
Use the SET CONSTRAINTS statement to specify, for a particular transaction,
whether a
deferrable constraint is checked following each DML statement (IMMEDIATE) or
when the
transaction is committed (DEFERRED). You can use this statement to set the
mode for a list of
constraint names or for ALL constraints.
The SET CONSTRAINTS mode lasts for the duration of the transaction or until
another SET
CONSTRAINTS statement resets the mode.
Note:
You can also use an ALTER SESSION statement with the SET CONSTRAINTS
clause to set
all deferrable constraints. This is equivalent to making issuing a SET
CONSTRAINTS
statement at the start of each transaction in the current session.
You cannot specify this statement inside of a trigger definition.
SET CONSTRAINTS can be a distributed statement. Existing database links that
have transactions
in process are notified when a SET CONSTRAINTS ALL statement is issued, and
new links are
notified that it was issued as soon as they start a transaction.
Prerequisites
To specify when a deferrable constraint is checked, you must have the READ or
SELECT privilege
on the table to which the constraint is applied unless the table is in your schema.

You might also like