On 3/24/18, x <tam118...@hotmail.com> wrote:
> Suppose you’re given an sql select statement that doesn’t contain an order
> by clause. Is there any way of accurately determining the order it will be
> sorted in.

No.  The database engine is free to return the rows in whatever order
it thinks will be most efficient.  This can change from one run to the
next, such that you can run the same query twice and get the rows in a
different order each time.  SQLite will normally return rows in the
same order unless there is an intervening ANALYZE command, but on
other SQL database engines a row order shift can happen at any time.
You can expect to sometimes see rows  in different orders if you run
the same query on two different versions of SQLite.

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

Reply via email to