I've 4 tables from which i need to delete rows. Below are the tables:
- Column a_sid of table "a" references column s_id of table "s" where s_id is primary key so as a_sid.
- Column v_sid of table "v" references column s_id of table "s"
- Column p_sid of table "p" references column s_id of table "s"
I need to delete all rows of 4 tables where a_type of "a" table = "AC"
From the manual:
DELETE t1, t2, t3 FROM t1 INNER JOIN t2 INNER JOIN t3
You just need to change it a bit and adapt it to your situation
Thanks guido. It worked
eeeeeeeeewwwwwwwwwwwwww!!!!!! :mad: :mad: :mad:
i didn't believe it until looked it up, and that is indeed what it says
please, let's not ever show anyone that particular example again
instead, let's show them this --
DELETE t1, t2, t3
<font color='"Blue"'>[B]ON[/B]</font> t2.id = t1.id
<font color='"Blue"'>[B]ON[/B]</font> t3.id = t1.id
You know, I had some doubts, so I read it twice and looked at the whole page in search of some 'ON' clause, but there wasn't, so I assumed in the case of multiple table deletes the MySQL syntax was different...
I'm glad you confirm my doubts