I\'m using the SQLite with Android, and I want to know the best way to get the generated id of the row I inserted.
A solution I think makes a search after include, b
I checked the sources.
insert method use sqlite3_last_insert_rowid function to return an id.
According to the documentation: https://www.sqlite.org/c3ref/last_insert_rowid.html
The row id is the hidden column or a column of type INTEGER PRIMARY KEY if it's declared.
Each entry in most SQLite tables (except for
WITHOUT ROWIDtables) has a unique 64-bit signed integer key called the "rowid". The rowid is always available as an undeclared column named ROWID, OID, or _ROWID_ as long as those names are not also used by explicitly declared columns. If the table has a column of typeINTEGER PRIMARY KEYthen that column is another alias for the rowid.
So that is the default _ID column usually