📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

What happens when you try to insert a child row whose foreign key does not match any parent row?

A. The insert is rejected with a referential integrity error ✅
B. The parent row is deleted
C. The child row is inserted with a new parent created automatically
D. The foreign key is set to zero

Correct Answer: A. The insert is rejected with a referential integrity error

Explanation

The DBMS enforces referential integrity by refusing child rows that reference a non-existent parent.