Answers for "delete row query in sqlite android"

1

how to delete a record from sqlite in android

//---deletes a particular title---
public boolean deleteTitle(String name) 
{
    return db.delete(DATABASE_TABLE, KEY_NAME + "=" + name, null) > 0;
}
or

public boolean deleteTitle(String name) 
{
    return db.delete(DATABASE_TABLE, KEY_NAME + "=?", new String[]{name}) > 0;
}
Posted by: Guest on November-01-2021
0

android sqlite delete where clause

SQLiteDatabase db = getWritableDatabase();

db.delete("TABLE_NAME","id=? and name=?",new String[]{"1","foo"});
Posted by: Guest on October-15-2021

Browse Popular Code Answers by Language