Android SQlite更新查询

Pro*_*mer 4 sqlite android

我有一个更新查询,我需要传递多个参数.请指导怎么做.这里代替"id",我想要多个参数,例如名称年龄.

//码

   ContentValues updateCountry = new ContentValues();
   updateCountry.put("country_name", "United States");
   db.update("tbl_countries", updateCountry, "id=?", new String[] {Long.toString(countryId)})
Run Code Online (Sandbox Code Playgroud)

use*_*414 16

尝试

   ContentValues updateCountry = new ContentValues();
   updateCountry.put("country_name", "United States");
   db.update("tbl_countries", updateCountry, "id=? AND name=? AND age=?", new String[]{Long.toString(countryId),"name_value","age_value"});
Run Code Online (Sandbox Code Playgroud)