📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

What does ON DELETE RESTRICT (or NO ACTION) do?

A. Updates child rows to a new parent
B. Allows orphan rows
C. Deletes child rows automatically
D. Prevents deleting a parent row while child rows reference it ✅

Correct Answer: D. Prevents deleting a parent row while child rows reference it

Explanation

RESTRICT / NO ACTION blocks the delete to protect child rows from becoming orphans.