📞 0339-0387701 (WhatsApp)
Contact
☰
🔍
Home
Important MCQs
Computer
Current Affairs
Data Science & AI (NCCIA)
Database & Data Handling (NCCIA)
English
Everyday Science
General Knowledge
General Science
Information & Networking (NCCIA)
Islamic Studies MCQs
Maths MCQs
Pak Study
Pedagogy
Software Engineering (NCCIA)
Telecom / Electrical Fundamentals (NCCIA)
Urdu MCQs
Past Papers
ASF Past Papers
FIA Past Papers
FPSC Past Papers
NCCIA Past Papers
NTS Past Papers
PPSC Past Papers
Latest Jobs
Army Jobs
Education Department
Federal Govt Jobs
Health Department
Police Jobs
Sindh Govt Jobs
Resources
About Us
Contact
🔍
Home
» Can a PRIMARY KEY column contain NULL?
« 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.
« Why can a UNIQUE column contain a NULL in many…
What is the difference between NULL and an empty string… »
Related MCQs
Why should a primary key ideally be minimal, using as few columns as needed?
In a Student-Course enrolment junction table, what is the usual primary key?
What is a disadvantage of a natural key?
In a Students table, RollNo assigned by the school is best described as:
In a junction table, can the same foreign-key value appear many times?
A data file has columns Name, Age and City separated by commas and a header row. What format is this?
A relation in the relational model is:
What is a cold backup?