Reputation: 32233
I want to update a row in a table, updating all the columns to new values except one that should keep the greatest value between the old and newValue.
Is there some way of doing this without creating the raw query (for example using the update(String table, ContentValues values, String whereClause, String\[\] whereArgs)
function or other similar using ContentValues) in order to seize the character scaping and other advantages of that providers?
The query I want to achieve is something like:
UPDATE users SET name='newName', address='newAddress',
lastLogin=GREATEST(lastLogin,1348757941);
Upvotes: 0
Views: 576