Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
How can we drop a database in android?
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) {....}
Add a comment
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);
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.