Which of the following is true about unique constraint?
A) It allows duplicate values in a column.
B) It enforces that all values in a column must be unique.
C) It is only applicable to primary key columns.
D) It is used to define relationships between tables.
Answer:
B) It enforces that all values in a column must be unique.
Explanation:
A unique constraint in a database ensures that all values in a specified column must be unique, meaning no duplicate values are allowed in that column. It is not limited to primary key columns and is used to maintain data integrity.