Jump to content

[SOLVED] Deleting records from multiple tables?


n8w

Recommended Posts

I would like to delete records from multiple tables... I have this tutorial http://www.electrictoolbox.com/article/mysql/cross-table-delete/ .. but still can't figure out the correct syntax for my scenario

 

I want to delete all records with user_id=154 from tables users, illustrators, comments

*note: each table has a user_id column

 

how should I write that?

 

DELETE users.*, illustrators.*, comments.*

FROM users u, illustrators i, comments c

WHERE ????

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.