Constraints Flashcards

0
Q

Constraint syntax

A

CONSTRAINT nameOconstrsaint UNIQUE(column2addconstrainton)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

Types of constraints

A

Primary key - ensures each row has a uniqueID

Foreign key - ensures FK points to valid PK

Check constraint - enforces formulas (check clauses) defined on a column.

Unique - no 2 rows can have same unique values.

NOT NULL - does not allow NULL values

Note: there can only be 1 NULL entry

How well did you know this?
1
Not at all
2
3
4
5
Perfectly