On 16 May 2012, at 11:14pm, Goatjugsoup <goatjugs...@hotmail.com> wrote:

> Well, a new thought just came to me, if I use the same sql statement will the
> resultset be in the same order each time because if that is the case I
> imagine I could use a for statement and an index to move through it the way
> I want to with next inside of that as many times as it takes to get to where
> I need.

SQLite is free to return rows in any order which satisfies your ORDER BY 
clause.  It is possible for the same SELECT statement, run twice in a row, with 
the same data in the table, to return its rows in a different order.  Two ways 
I can think of to make this happen are to create a new index, and to do an 
ANALYZE, but there are probably others which I haven't thought of.

If you want your rows to be returned in the same order every time, use an ORDER 
BY clause for your SELECT statement, and make sure the order you've asked for 
the rows gives every row a unique value.

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

Reply via email to