I have the following command to drop all tables, to be performed in onUpgrade:
@Override
public void onUpgrade(SQLiteDatabase db, int i, int i2) {
// Drop all tables...
String query = "select 'drop table ' || name || ';' from sqlite_master " +
"where type = 'table';";
db.rawQuery(query, null);
onCreate(db);
}
However it doesn't seem to do anything. All my old tables are still there. How do I execute this query properly?