How Can Delete Sqlite Database in Android Programmatically?
Contents

How do I delete a SQLite database?

To create a new database, just do sqlite_open() or from the command line sqlite3 databasefilename . To drop a database, delete the file. you can do this from the eclipse view called “FileBrowser” out of the “Android” Category for example.

How delete all data from SQLite database in Android?

SQLiteDatabase db = this. getWritableDatabase(); db. execSQL(“DELETE FROM tablename”); //delete all rows in a table db. close();

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest