CBSE Class 12 Computer Science Question 27 of 44

Solved 2025 Sample Question Paper CBSE Class 12 Computer Science (083) — Question 6

Back to all questions
6
Question

Question 27-I(a)

What constraint should be applied on a table column so that duplicate values are not allowed in that column, but NULL is allowed.

Answer

To prevent duplicate values in a table column while allowing NULL values, we should use the UNIQUE constraint. The UNIQUE constraint ensures that all values in the specified column are different, but it permits multiple NULLs since NULL is considered distinct from any other value.