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. UNIQUE
B. CHECK
C. FOREIGN KEY
D. PRIMARY KEY
Answer: Option A
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
Which SQL operator allows you to check if a column value matches any item contained within a comma-separated list of explicit values?
A. BETWEEN
B. LIKE
C. IN
D. EXISTS

Correct Answer: Option C


Explanation:
The IN operator allows you to specify multiple literal values or a subquery inside a WHERE clause, testing if an attribute matches any element in the list.

This question belongs to: Computer Database Management System (DBMS)
Question #2
Which SQL keyword is used within a SELECT query to filter records matching a specified pattern using wildcards?
A. EXISTS
B. BETWEEN
C. IN
D. LIKE

Correct Answer: Option D


Explanation:
The LIKE operator is specifically used in a WHERE clause to perform pattern matching on string columns using wildcards (% and _).

This question belongs to: Computer Database Management System (DBMS)
Question #3
Which SQL operator returns only the rows that are common and present in the outputs of both executing SELECT queries?
A. EXCEPT / MINUS
B. INTERSECT
C. UNION
D. JOIN

Correct Answer: Option B


Explanation:
The INTERSECT operator returns only the distinct rows that appear in the result sets of both SELECT statements.

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