Wednesday, December 5, 2007

SQL: Multiple Delete

The Definitive Open-souce web photo gallery
http://www.plogger.org/

sql: mySQL: using: Multiple Delete: Deleting records from multiple tables.
DELETE t1,t2 FROM t1,t2,t3 WHERE t1.id=t2.id AND t2.id=t3.id;

Or:

DELETE FROM t1,t2 USING t1,t2,t3 WHERE t1.id=t2.id AND t2.id=t3.id;

No comments: