Reputation: 1004
How can we drop a database in android?
Upvotes: 2
Views: 2969
Reputation: 81
This is going to be a very late reply to this post, but if anyone else is facing the same issue, can try the following.
myContext.deleteDatabase(DB_NAME);
Upvotes: 2
Reputation:
This should work:
private SQLiteDatabase db;
private static final String TABLE_NAME = "name_of_table";
try {
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
db.execSQL("VACUUM");
} catch (SQLException sqle) {....}
Upvotes: 2