What does the ON DELETE CASCADE option on a foreign key do?
- A Prevents deletion of the parent row
- B Deletes matching child rows when the parent row is deleted
- C Sets child rows to NULL
- D Logs the deletion without acting
Answer
Deletes matching child rows when the parent row is deleted
CASCADE propagates the delete to dependent rows. Alternatives are RESTRICT, NO ACTION and SET NULL, and the choice should reflect the real business rule.





