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. PRIMARY KEY
B. FOREIGN KEY
C. UNIQUE
D. CHECK
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
What is the purpose of a Foreign Key?
A. To sort data
B. To uniquely identify records
C. To create indexes
D. To link two tables and enforce referential integrity

Correct Answer: Option D


Explanation:
A foreign key establishes a relationship between tables and maintains referential integrity.

This question belongs to: Computer Database Management System (DBMS)
Question #2
Which SQL clause is used to filter groups after grouping?
A. WHERE
B. GROUP BY
C. HAVING
D. ORDER BY

Correct Answer: Option C


Explanation:
HAVING is used to filter groups based on aggregate conditions, applied after GROUP BY.

This question belongs to: Computer Database Management System (DBMS)
Question #3
Which wildcard character is used with the SQL LIKE operator to represent zero, one, or multiple characters?
A. Percentage sign (%)
B. Ampersand (&)
C. Hash (#)
D. Underscore (_)

Correct Answer: Option A


Explanation:
The percentage sign (%) is used as a wildcard character to match any sequence of zero or more characters in an SQL LIKE string comparison query.

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