📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

What does a foreign key constraint prevent?

A. Duplicate values in a primary key
B. NULL values in a primary key
C. Text in a numeric column
D. A child row referring to a parent row that does not exist ✅

Correct Answer: D. A child row referring to a parent row that does not exist

Explanation

A foreign key constraint requires every foreign key value to match an existing primary key value or be NULL.