Mysql
 sql >> Database >  >> RDS >> Mysql

Come eliminare righe da tre tabelle - errore di query

Prova in questo modo..

DELETE c, o, od
 FROM customers as c
  JOIN orders as o ON c.id = o.customers_id
  JOIN order_detail as od ON o.id = od.orders_id
 WHERE c.id IN (66,67,68,90,85,81,80,78,76,74,71,118,113,110,149)

Per ulteriori riferimenti http://dev.mysql.com/doc/ refman/5.7/en/delete.html