How do I update an android sqlite database column value to null using ContentValues?
For example, I want to do the following on a database update.
Is there a constant I can use instead of null
, which won't compile if I use it like:
ContentValues args = new ContentValues();
args.put(KEY_RISK_AMOUNT, null); // what constant do I us开发者_JAVA百科e instead of null?
Use ContentValues.putNull(java.lang.String)
:
ContentValues args = new ContentValues();
args.putNull(KEY_RISK_AMOUNT);
精彩评论