sql-parser icon indicating copy to clipboard operation
sql-parser copied to clipboard

Support multiple-table syntax of DELETE statement

Open JanVoracek opened this issue 6 years ago • 0 comments

Docs: https://dev.mysql.com/doc/refman/8.0/en/delete.html#idm140219041342912

There are two possible forms of multiple-table delete statement (queries based on this tutorial):

  • DELETE t1, t2 FROM t1 INNER JOIN t2 ON t2.ref = t1.id WHERE t1.id = 1
  • DELETE FROM t1, t2 USING t1 INNER JOIN t2 ON t2.ref = t1.id WHERE t1.id = 1;

Looks like the former one is supported but the latter one is not – it ends up with two ParseExceptions.

JanVoracek avatar Aug 19 '19 13:08 JanVoracek