Mysql – How to delete only orphan child rows with ON DELETE?
I have a parent table and a child table. A parent row stores the foreign key to the child row. If I set the constraint on the foreign key to ON DELETE CASCADE then that will throw an error when…