sqlite db update
android, sqlite
Solution
You can use `rawQuery` like this:
cur = mDb.rawQuery("update " + TABLE_NAME
+ " set column1=mango where id='" + _id + "'",null);
where
- `cur` is `Cursor` object
- `TABLE_NAME` is `NAME OF THE TABLE`
- `_id` is `name of the column` (only example)
Problem
Is there an easy way to update a table in sqlite in android? (like a single line in built method) ? I have a table with few columns and primary is one column. I want to search by the primary key and then update a row in the table.