I need a single SQLite query to insert or update in SQLite table.
MyTable:
- Id(Primary key and not null)
- Name
- PhoneNumber
Expected Query: If the Id is not present then have to insert a new row and If the existing row value is changed then update the row when inserting multiple row.
EDIT 1:
I have posted INSERT query i have tried in Insert Multiple Rows in SQLite Error (error code = 1). Like that i I have tried using "INSERT OR REPLACE". But it is working with Firfox SQLite Manager Not working with Android SQLite
.
I have used sDataBase.execSQL(query)
to execute this query.