On Dec 22, 2008, at 5:43 PM, flakpit wrote: > > Good evening. > > Due to many deletions, my database is non sequential anymore. > > Is there any way to fetch the very first record in the database and > find the > id number? Or for that matter, a function to select the last record? > > I've tried the "SELECT TOP 1" function butt that apparently isn't > sqlite > syntax.
The 'first record' is a malleable concept. You can find the record with the lowest rowid value with: SELECT ... FROM <table> ORDER BY rowid LIMIT 1; > -- > View this message in context: > http://www.nabble.com/Fetch-first-non-sequential-record-tp21125757p21125757.html > Sent from the SQLite mailing list archive at Nabble.com. > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users