Test Index
Structured Query Language (SQL)
© examsnet.com
Question : 15 of 58
Marks:
+1,
-0
While creating a table, which constraint does not allow insertion of duplicate values in the table ?
[CBSE 2025 Set 4]
Solution:
Concept:Constraints are rules applied to columns while creating a table.Explanation:
UNIQUE: no two rows can have the same value in that column, so a duplicate insert is rejected.DISTINCT: a keyword of SELECT that hides duplicate rows in the output; it is not a constraint.NOT NULL: a constraint, but it only forbids NULL values; duplicates are allowed.HAVING: a clause that filters groups in SELECT ... GROUP BY.Key point: A PRIMARY KEY also forbids duplicates (it is UNIQUE + NOT NULL).Answer:Option A (UNIQUE)© examsnet.com
Go to Question: