开发者

How do I update an android sqlite database column value to null using ContentValues?

开发者 https://www.devze.com 2023-03-10 03:11 出处:网络
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:

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消