Friday, October 18, 2013

How to get list of table names in sqlite database (Android)

Cursor c = db.rawQuery("SELECT name FROM sqlite_master", null);
if (c.moveToFirst()) {
while (!c.isAfterLast()) {
//table gives you table names
String table= c.getString(0);

c.moveToNext();
}
}

No comments:

Post a Comment