Examples of Setting the Transaction Mode for Constraints
The following example shows how to defer checking constraints within a
transaction until the transaction is complete. The SET Transaction Mode statement
in the example specifies that any constraints on any tables in the database
are not checked until the COMMIT WORK statement is encountered.
BEGIN WORK;
SET CONSTRAINTS ALL DEFERRED;
...
COMMIT WORK;
The following example specifies that a list of constraints is not checked
until the transaction is complete:
BEGIN WORK;
SET CONSTRAINTS update_const, insert_const DEFERRED;
...
COMMIT WORK;