IBM DB2 11.1 Advanced DBA for Linux, UNIX, and Windows — Question 39
Which constraint can be used to ensure that identical values are never stored in a set of columns in a table?
Answer options
- A. NOT NULL
- B. Foreign key
- C. Primary key
- D. Informational constraint
Correct answer: C
Explanation
The correct answer is C, Primary key, as it enforces uniqueness for the specified columns, preventing duplicate entries. NOT NULL only ensures that a column cannot have null values, a Foreign key establishes a relationship between tables but does not enforce uniqueness, and an Informational constraint is not a standard type of constraint for managing uniqueness.