Which constraint can be defined only at the column level?
A.
UNIQUE
B.
NOT NULL
C.
CHECK
D.
PRIMARY KEY
E.
FOREIGN KEY
Explanation:
The NOT NULL constraint can be defined only at the column level. It enforces that a value must be defined for
this column such that the column may not be NULL for any row.
Incorrect Answers
A:. The UNIQUE constraint enforces uniqueness on values in the constrained column. It can be defined not
only at the column level.
C:. The CHECK constraint enforces that values added to the constrained column must be present in a static list
of values permitted for the column.
D:. The PRIMARY KEY constraint stipulates that values in the constrained column(s) must be unique and not
NULL. If the primary key applies to multiple columns, then the combination of values in the columns must be
unique and not NULL.
E:. The FOREIGN KEY constraint enforces that only values in the primary key of a parent table may be
included as values in the constrained column(s) of the child table.
OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 227-232
Chapter 5: Creating Oracle Database Objects