On 10/11/2016 07:57 PM, Simon Slavin wrote:
On 11 Oct 2016, at 1:44pm, Eric Minbiole <eminbi...@gmail.com> wrote:

Your problem is that although SQL accepts the clauses written in the order
you wrote them in, the LIMIT clause is processed before the ORDER BY clause.
Is that really true? I had always thought that the ORDER BY was processed
first, though I admit I don't see anything authoritative either way.
I didn't know.  Which is why I wrote about what was happening rather than what 
a specification said should happen.  The order in which these clauses are 
listed in the SQLite documentation suggests that ORDER BY should be performed 
/before/ LIMIT.

This is correct. In an SQL SELECT, the sorting is done before the limiting.

Dan.

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to