NOTE: Conclusions here are provisional and input from a genuine SQL guru would be greatly appreciated.
SQL multiple table delete
Delete rows in three tables that share a key and satisfy a WHERE condition (in one of the tables). Table T3 will have a single row for each of these keys, as will table T2 for that matter, but table 1 will have multiple entries for each key.
The MySQL docs show up to two tables deleted, using three:
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.id=t2.id AND t2.id=t3.id;
NOTE: Conclusions here are provisional and input from a genuine SQL guru would be greatly appreciated.
SQL multiple table delete
Delete rows in three tables that share a key and satisfy a WHERE condition (in one of the tables). Table T3 will have a single row for each of these keys, as will table T2 for that matter, but table 1 will have multiple entries for each key.
The MySQL docs show up to two tables deleted, using three:
DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.id=t2.id AND t2.id=t3.id;