.\\" auto-generated by docbook2man-spec $Revision: 1.25 $
.TH "SET CONSTRAINTS" "" "29 March 2001" "SQL - Language Statements" "SQL Commands"
.SH NAME
SET CONSTRAINTS \- Set the constraint mode of the current SQL-transaction
.SH SYNOPSIS
.sp
.nf
SET CONSTRAINTS { ALL | \fIconstraint\fR [, ...] } { DEFERRED | IMMEDIATE }
  
.sp
.fi
.SH "DESCRIPTION"
.PP
\fBSET CONSTRAINTS\fR sets the behavior of constraint
evaluation in the current transaction. In
\fBIMMEDIATE\fR mode, constraints are checked at the end
of each statement. In \fBDEFERRED\fR mode, constraints
are not checked until transaction commit.
.PP
Upon creation, a constraint is always give one of three
characteristics: \fBINITIALLY DEFERRED\fR,
\fBINITIALLY IMMEDIATE DEFERRABLE\fR, or
\fBINITIALLY IMMEDIATE NOT DEFERRABLE\fR. The third
class is not affected by the \fBSET CONSTRAINTS\fR
command.
.PP
Currently, only foreign key constraints are affected by this
setting. Check and unique constraints are always effectively
initially immediate not deferrable.
.SH "COMPATIBILITY"
.SS "SQL92, SQL99"
.PP
\fBSET CONSTRAINT\fR is defined in
SQL92 and SQL99.
