SQLite UPDATE with ORDER BY and LIMIT clauses #5188
Replies: 2 comments 2 replies
-
Apparently SQLite used in SQLiteStudio must be built in a different way to make this compilation option work, according to https://sqlite.org/compile.html#enable_update_delete_limit Currently the build flow uses SQLite amalgamation file, not the raw source code. I'll change it for the next release. |
Beta Was this translation helpful? Give feedback.
-
Hello Pawel, Another minor issue with the UPDATE statement is that SQLiteStudio does not support a table alias in the UPDATE clause. I tried the following query from this page:
However, the parser underlines in red everything after "AS e" above. The alias in FROM clause does not cause any issues though. Executing the query works as expected, without errors, despite it being underlined in red. Would it also be possible for the code assistant to show a dropdown with the columns in the actual table after typing an alias followed by a dot? For example, typing "s." above would show the columns from the Thank you! |
Beta Was this translation helpful? Give feedback.
-
I am trying to execute the following query on the chinook sample database:
However, I get the following error:
According to the docs, ORDER BY and LIMIT clauses for UPDATE are available if SQLite has been built with SQLITE_ENABLE_UPDATE_DELETE_LIMIT.
I then checked the output of
PRAGMA compile_options;
and it contains ENABLE_UPDATE_DELETE_LIMIT so I guess that ORDER BY and LIMIT clauses for UPDATE should be available.Moreover, running the same query through the
sqlite3
command line shell results in an error also.Please let me know what I am doing wrong.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions