Delete multiple rows row contains some values in sqlite
Answers
Answered by
0
public void delSmsData(int id){
String deleteQuery = "DELETE FROM "+TABLE_LO_SMSDATA+" WHERE _id="+id+"";
SQLiteDatabase db = this.getWritableDatabase();
db.execSQL(deleteQuery); //delete single row by ID in a table
db.execSQL("vacuum");
db.close();
Log.e("Debug", "Successful delete of message with id no. " + id);
}
Similar questions