I have a question – I have finished the database (SQLite), with updates, I analyze the structure and see whether I need to add new data or change the value in existing positions database. So I have a question – is it possible to replace the values in the entire line at once (that is, in all cells (which are the same id) columns), or there is a possibility to replace the values for each column.
Share
If you have the id of the row to update, you can use the
SQLiteDatabase.update()(docs here).As you can see in the
update()function, you useContentValuesto udpate the row, and provide the row id in thewhereClauseof the function. Inside theContentValues, you can put new values of columns, as you’d normally do for an insert:etc. The update call would be something like