开发者

delete from table1,table2,table3 where?

开发者 https://www.devze.com 2023-01-19 04:56 出处:网络
If all tables I want to delete from have the column gamer_id can i do a delete from table1, table2, ta开发者_C百科ble3 where gamer_id = 123?

If all tables I want to delete from have the column gamer_id

can i do a delete from table1, table2, ta开发者_C百科ble3 where gamer_id = 123?

or is there a different syntax?


MySQL supports multi-table deletes:

DELETE t1, t2, t3
  FROM TABLE_1 t1
  JOIN TABLE_2 t2 ON t2.gamer_id = t1.gamer_id
  JOIN TABLE_3 t3 ON t3.gamer_id = t1.gamer_id
 WHERE t1.gamer_id = 123
0

精彩评论

暂无评论...
验证码 换一张
取 消