I have an SQL Update statement like:
UPDATE table set column = column+1
Is it possible to do someting similiar with ContentValues?
ContentValues values = new ContentValues();
values.put("colum", ?);
I have an SQL Update statement like:
UPDATE table set column = column+1
Is it possible to do someting similiar with ContentValues?
ContentValues values = new ContentValues();
values.put("colum", ?);
Is it possible to do someting similiar with ContentValues?
No. You can only put literals in ContentValues, not expressions.
Under the hood the values in ContentValues get translated to sqlite3_bind...() calls and sqlite3 parameter binding only supports replacing literals with parameters.
To use an expression, just use execSQL() with the raw SQL you have.