I have to simple tables in SQLite in my app and I need to insert into my tables values, but when I insert into the first I need to find value id ( primary key first column ) and that to be foreign key in second table. I know to find this with select last but is there better way to find this, id of last inserted row ?
Share
If you’re using android.database.sqlite.SQLiteDatabase then you can use insert() which returns the id of the inserted row: see here