In my previous post I have explained how to insert values in database using SQLite.Now I am going to explain about deleting the values in database using SQLite.
public void deleteChat(String GroupId)
{
String deleteQuery = "Delete FROM " + "TableName"+ " Where "
+ "" + "Group"+ " in " + "(" + GroupId + ")";
SQLiteDatabase db = getWritableDatabase();
db.execSQL(deleteQuery);
}
"TableName"=Name of the Table
"Group"=Column Name
Syntax:
Delete from TableName where columnName in(id);
Happy Coding:)
No comments:
Post a Comment