Delete Sqlite Database In Android
I have created a database in sqlite named as DGC.DB and table name is drivers and now I want to drop my existing table in sqlite database .I try to delete this by exute delete que
To Drop a table, use:
Replace
publicvoiddeleteAll() {
db.delete(TABLE_NAME, null, null);
}
With
publicvoiddropTable() {
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
}
You may like these posts
Post a Comment for "Delete Sqlite Database In Android"