The order of rows returned by a query is undefined - i.e. from the point of view of the application, a random member of the result set will be returned last - unless you include an ORDER BY clause that uniquely defines the order of the records to be returned. Given the latter, it is easy to define an exactly opposite ORDER BY clause and retrieve only the first record via LIMIT 1.
Why do you think you need to know if/how many records remain? -----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Philippe RIO Gesendet: Dienstag, 15. Oktober 2019 17:35 An: sqlite-users@mailinglists.sqlite.org Betreff: [EXTERNAL] [sqlite] Last record A short question : how could I know if I am reading the last record with sqlite (sqlite3_step)? sqlite3_step only returns SQLITE_ROW. Is there a function for that case which returns SQLITE_DONE? A function which is one record in advance from sqlite3_step. Thank every one ----- -------- Kenavo https://md5finder.blogspot.com/ (Never be pleased, always improve) -- Sent from: http://sqlite.1065341.n5.nabble.com/ _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users