If you want a particular order, use an ORDER BY clause. If you don't specify one, the order of the result set is undefined, and therefore the db can do whatever it likes. Even if it seems predictable as observed in your experiments, it may change when the result set gets larger, or as the db gets older (more deletes and inserts), or as you upgrade to newer versions of SQLite.
--Ned. http://nedbatchelder.com -----Original Message----- From: Cory Nelson [mailto:[EMAIL PROTECTED] Sent: Wednesday, 07 September, 2005 6:15 AM To: [email protected] Subject: Re: [sqlite] records sorted or not AFAIK if you do not give an ORDER BY clause the db can give it to you in any order it feels like. On 9/6/05, Tom Deblauwe <[EMAIL PROTECTED]> wrote: > Hello, > > If I do a select query, and that query uses an index, will the results > come out sorted like the index? Or is that random? > > Kind regards, > Tom > > > -- Cory Nelson http://www.int64.org

