Delete SQLite Row with where clause with multiple clauses

前端 未结 2 1965
余生分开走
余生分开走 2021-02-20 02:16

I\'ve been searching around and not managed to find a solution or working example so here goes.

I\'ve set up an SQLite database which has five columns with different fie

2条回答
  •  花落未央
    2021-02-20 02:44

    You should use:

    Database.delete(DATABASE_TABLE,
                    "KEY_DATE=? AND KEY_GRADE = ? AND KEY_STYLE = ? AND KEY_PUMPLEVEL = ?",
                     new String[]{"date", "style2", "style", "pumpLevel"});
    

    which simplifies escaping values.

提交回复
热议问题