📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Which statement about a unique key and NULL is true in most DBMSs?

A. A UNIQUE column treats all NULLs as duplicates in every DBMS
B. A UNIQUE column may allow NULL values, often one NULL or multiple depending on the DBMS ✅
C. A UNIQUE column can never contain NULL
D. A UNIQUE column must contain NULL in every row

Correct Answer: B. A UNIQUE column may allow NULL values, often one NULL or multiple depending on the DBMS

Explanation

SQL standard practice varies: SQL Server allows one NULL, while Oracle and MySQL allow multiple NULLs in a UNIQUE column.