📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

What does a foreign key constraint guarantee?

A. That the referenced table is empty
B. That every foreign-key value is unique
C. That every foreign-key value either matches an existing primary-key value in the referenced table or is NULL ✅
D. That the foreign key is the primary key

Correct Answer: C. That every foreign-key value either matches an existing primary-key value in the referenced table or is NULL

Explanation

Referential integrity requires a foreign key to point to a real parent row, unless NULL is allowed.