How does Android’s SQLite library resolve conflicts if I insert duplicate rows? I am building my app for API level 7, which unfortunately does not have the SQLiteDatabase.insertOnConflict() method that was included starting in API level 8.
How does Android’s SQLite library resolve conflicts if I insert duplicate rows? I am
Share
You can specify a UNIQUE index in the table definition which will allow rows to be REPLACED:
If a row an INSERT or UPDATE statement tries to add a row with an id which already exists, the existing row is replaced with the new one.