sqlite db update

后端 未结 8 1678
暗喜
暗喜 2020-12-11 09:14

Is there an easy way to update a table in sqlite in android? (like a single line in built method) ? I have a table with few columns and primary is one column. I want to sear

8条回答
  •  暖寄归人
    2020-12-11 09:16

    Try this:

    public void updateFunction(int id) {
                String updateStmnt  = "UPDATE  YOUR_TABLE SET YOUR_COLUMN = "
                        + id;
                database.execSQL(updateStmnt);
            }
    

    Hope it will help.

提交回复
热议问题