Reputation: 89
I'm a little bit confused if I insert a new row to a table by using SQLiteDatabase.insert() method and get a 1 as a result then the ID of that row is 1 and not a 0, right?
Upvotes: 0
Views: 69
Reputation: 2372
The returned value is the row ID of the newly inserted row, or -1 if an error occurred
See docs here
Upvotes: 1
Reputation: 152817
Yes. It's the new row's id. Autogenerated rowids start from 1.
Upvotes: 3