You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new SQLite driver supports UPDATE with both ORDER BY and LIMIT, but for the DELETE statement it's not implemented yet. I updated the title to mention ORDER BY as well.
Hi @JanJakes, it seems to me that the driver translates the MySql query as if the sqlite used is compiled with SQLITE_ENABLE_UPDATE_DELETE_LIMIT (https://sqlite.org/compile.html#enable_update_delete_limit), but it is not.
I am not sure if is it possible to add in playground a sqlite version built with this flag but as a workaround, the query DELETE ... LIMIT, could be translated in something as:
DELETE FROM table
WHERE someColumn in
(
SELECT someColumn FROM table WHERE SomeCondition LIMIT 200
)
Activity
adamziel commentedon Apr 17, 2024
CC @kozer
[-]Support DELETE LIMIT[/-][+]Support `DELETE` with `LIMIT` and `ORDER BY`[/+]JanJakes commentedon Aug 12, 2025
The new SQLite driver supports
UPDATEwith bothORDER BYandLIMIT, but for theDELETEstatement it's not implemented yet. I updated the title to mentionORDER BYas well.MocioF commentedon Aug 13, 2025
Hi @JanJakes, it seems to me that the driver translates the MySql query as if the sqlite used is compiled with SQLITE_ENABLE_UPDATE_DELETE_LIMIT (https://sqlite.org/compile.html#enable_update_delete_limit), but it is not.
I am not sure if is it possible to add in playground a sqlite version built with this flag but as a workaround, the query DELETE ... LIMIT, could be translated in something as:
JanJakes commentedon Aug 14, 2025
Hi @MocioF, as this issue states, this is not yet implemented for the
DELETEstatement.ivan-ottinger commentedon Apr 17, 2026
Just a quick note that I run into this issue today while testing one Studio site.
Support DELETE with LIMIT and ORDER BY
JanJakes commentedon Apr 17, 2026
Ah, that's an easy fix: #365
ivan-ottinger commentedon Apr 21, 2026
Nice! Thanks for the fix, Jan!
Add support for `DELETE` with `LIMIT` and `ORDER BY` (#365)