开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜