Which constraint ensures that all values in a column are unique? MCQ with Answer and Explanation

Which constraint ensures that all values in a column are unique?
A. CHECK
B. FOREIGN KEY
C. UNIQUE
D. PRIMARY KEY
Answer: Option C
Solution (By JKSSB Mock Tests)
UNIQUE constraint ensures that all values in a column are distinct, but allows NULL (unless combined with NOT NULL).

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1
In SQL, which clause is used to filter rows before grouping?
A. HAVING
B. GROUP BY
C. WHERE
D. ORDER BY

Correct Answer: Option C


Explanation:
WHERE is used to filter individual rows before aggregation and grouping.

This question belongs to: Computer Database Management System (DBMS)
Question #2
In SQL, what does the wildcard '%' match when used with LIKE?
A. Only digits
B. A specific character
C. Any string of zero or more characters
D. Any single character

Correct Answer: Option C


Explanation:
'%' matches any sequence of zero or more characters, while '_' matches a single character.

This question belongs to: Computer Database Management System (DBMS)
Question #3
Which normal form addresses partial dependencies, i.e., non-prime attributes dependent on part of a composite primary key?
A. 1NF
B. 3NF
C. 2NF
D. BCNF

Correct Answer: Option C


Explanation:
Second Normal Form (2NF) eliminates partial dependencies by ensuring all non-key attributes are fully functionally dependent on the entire primary key.

This question belongs to: Computer Database Management System (DBMS)