Use the reserved word, rowid in a SQLite query to return the record number such as:
select rowid, field1, field2 from mytable;

Technical notes, and other ideas.
Use the reserved word, rowid in a SQLite query to return the record number such as:
select rowid, field1, field2 from mytable;