📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

What does ON DELETE CASCADE do?

A. Prevents deletion of the parent
B. Deletes the referencing child rows automatically when the parent is deleted ✅
C. Sets the foreign key to NULL
D. Prevents insertion of children

Correct Answer: B. Deletes the referencing child rows automatically when the parent is deleted

Explanation

ON DELETE CASCADE propagates a parent deletion to all child rows that reference it.