📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Can a PRIMARY KEY column contain NULL?

A. Only in MySQL
B. Yes, one NULL is allowed
C. No, a primary key cannot contain NULL ✅
D. Yes, if it is a composite key

Correct Answer: C. No, a primary key cannot contain NULL

Explanation

  • A primary key must uniquely identify every row, so none of its columns may be NULL.
  • This is the entity integrity rule.