Lesson 6 | FOREIGN KEY, CHECK, and UNIQUE constraints |
Objective | Identify the syntax components of the FOREIGN KEY, CHECK, and UNIQUE constraints |
FOREIGN KEY CONSTRAINT:
This constraint defines a foreign key as a reference to the primary key of another table.CHECK CONSTRAINT:
This constraint allows you to attach validation to a column.FOREIGN KEY
constraint.FOREIGN KEY
constraint within a
column specification
(rather than at the end of the column list). However, the syntax is somewhat different.
CHECK
constraint.
CHECK
constraint: