📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

A table has a candidate key {PhoneNo}. If PhoneNo can be NULL for some students, can it still be a candidate key?

A. Yes, if only one NULL exists
B. No, a candidate key must not contain NULLs ✅
C. Yes, NULLs are allowed in candidate keys
D. No, because it is not unique

Correct Answer: B. No, a candidate key must not contain NULLs

Explanation

A candidate key must uniquely identify every row, and NULL means unknown, so a candidate key cannot contain NULLs.