MySQL Foreign Key Referential Actions

Referential Actions When an UPDATE or DELETE operation affects a key value in the parent table that has matching rows in the child table, the result depends on the referential action specified by ON UPDATE and ON DELETE subclauses of the FOREIGN KEY clause. Referential actions include: CASCADE: Delete or update the row from the parent table and automatically delete or update the matching rows in the…