Il modo più semplice sarebbe eliminare da ciascuna tabella individualmente:
-- Remove all connections from A which reference
-- the B-rows you want to remove
DELETE FROM A_has_B
WHERE B_id IN (1,2,4);
-- Remove all connections from C which reference
-- the B-rows you want to remove
DELETE FROM C_has_B
WHERE B_id IN (1,2,4);
-- Finally remove the B-rows
DELETE FROM B
WHERE B_id IN (1,2,4);
MySQL ti consente anche di eliminare da più tabelle in un'unica istruzione. Ma non c'è modo di controllare l'ordine delle eliminazioni. Dal manuale :