In this chapter, we'll describe SQL Constraints and SQL Assertions in detail and show you the syntax to use to create, alter and destroy them.
-
Constraint
A Schema may contain zero or more integrity Constraints (an Assertion is ju... -
Constraint Descriptors
A UNIQUE Constraint is defined by a descriptor that contains five pieces of... -
Constraint Definition
A Constraint definition creates a < Table Constraint>, a <Column Constraint... -
Constraint_type -- UNIQUE Constraint
A UNIQUE Constraint is either a < Table Constraint> or a <Column Constraint... -
Constraint_type -- PRIMARY KEY Constraint
A PRIMARY KEY Constraint is either a < Table Constraint> or a <Column Const... -
Constraint_type -- FOREIGN KEY Constraint
A FOREIGN KEY Constraint is either a < Table Constraint> or a <Column Const... -
Constraint_type -- NOT NULL Constraint
A NOT NULL Constraint is a <Column Constraint>, defining a rule that constr... -
Constraint_type -- CHECK Constraint
A CHECK Constraint is either a < Table Constraint>, a <Column Constraint> o... -
CREATE ASSERTION statement
The CREATE ASSERTION statement names a new Constraint and defines the Const... -
Interlocking references
An example of an interlocking reference is: Every Employee must be in a dep... -
Dropping Constraints
Dropping a Constraint is straightforward, providing that you know the <Cons... -
DROP ASSERTION statement
The DROP ASSERTION statement destroys an Assertion. The required syntax for... -
Dialects
In most DBMSs, it's common that the UNIQUE specification is not supported, ...