Question

Si toutes les tables que je veux supprimer la colonne ont gamer_id

peut-je faire une suppression de table1, table2, table3 où gamer_id = 123?

ou est-il une syntaxe différente?

Était-ce utile?

La solution

MySQL supporte suppressions multi-table :

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
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top