Page 1 of 1

How to delete records from multiple tables in the same time?

Posted: Thu Apr 10, 2008 6:16 am
by mathsaddict
Well, the title is self explanatory :)
I've a project and i'm stuck with this problem, iw it possible and how efficient is it to perform deletion from multiple tables in the same time?
Can anyone post an example?
thanks you

Re: How to delete records from multiple tables in the same time?

Posted: Thu Apr 10, 2008 6:21 am
by EverLearning

Code: Select all

DELETE t1, t2 
FROM t1, t2, t3 
WHERE t1.id=t2.id AND t2.id=t3.id;
Mysql Delete Syntax