delete(String t开发者_运维知识库able, String whereClause, String[] whereArgs)
update(String table, ContentValues values, String whereClause, String[] whereArgs)
What is this String[] whereArgs
? Is it connected with "?" (so called wild card)?
Yes, the String[] whereArgs
contains the arguments to be appended to the whereClause
.
For example, you want to make a delete query:
delete from InfoTable where name = "ABC" and id = "23"
then the query should be:
delete("InfoTable", "name = ? AND id = ?" , new String[] {"ABC", "23"});
精彩评论