Archive for December, 2008

DELETE and JOIN in MySQL

I noticed something weird today, while attempting to do a DELETE query with a JOIN statement. The syntax was simple though: DELETE FROM   tableA JOIN   tableB ON tableA.tableB_id = tableB.id WHERE   tableA.foo = 'bar' And it doesn’t work! It’s a syntax error ...