Skip to content

MySQL: Add support for ORDER BY on single-table UPDATE#2296

Open
tpyo wants to merge 2 commits intoapache:mainfrom
tpyo:main
Open

MySQL: Add support for ORDER BY on single-table UPDATE#2296
tpyo wants to merge 2 commits intoapache:mainfrom
tpyo:main

Conversation

@tpyo
Copy link
Copy Markdown

@tpyo tpyo commented Apr 5, 2026

Adds parsing support for the MySQL-specific ORDER BY clause in single-table UPDATE statements, as documented in the MySQL 8.4 reference.

Changes:

  • Added order_by: Vec<OrderByExpr> field to the Update AST struct
  • Added supports_update_order_by() dialect method (default false)
  • Added tests for UPDATE ... ORDER BY, UPDATE ... ORDER BY ... LIMIT

Example syntax that would be supported:

UPDATE foo SET bar = false WHERE foo = true ORDER BY foo ASC;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant