SQLite - SELECT TOP syntax error

I am trying to use the SELECT TOP 1 * FROM tasks WHERE dueDate < ?1 ORDER BY dueDate DESC , but SQLite says near "1": syntax error . What's wrong?

+51
sql sqlite
Mar 23 2018-11-11T00:
source share
1 answer

Use LIMIT 1 at the end of the query instead of TOP 1 (which sqlite syntax is not valid).

You may also need to remove ? in dueDate < ?1 , but I don’t know sqlite well enough to be sure.

+103
Mar 23 2018-11-11T00:
source share



All Articles