开发者

How to delete specific columns of a particular row from SQLite in Android

I need to write a query to delete specific columns of a particular row from SQLite in Android. I want to use it in the form of "db.delete (String table, String whereClause, String[] whereArgs)".

My application contain开发者_JS百科s 4 columns for each row. I need to delete only 2 columns of a particular row. How can I do this?


You can't delete only columns of particular row. You have to delete either two columns for all rows or you have to set some definite value like null or 0 for that.


db.delete is a convenience method for deleting rows in the database. This will delete the entire row not just a few columns in the row.

You cannot delete a particular column for a specific row. You can only delete column for the entire table.

So you may consider setting the column values of the particular with some default value like NULL or 0.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜