How to get all table names in android sqlite database?

后端 未结 5 1605
逝去的感伤
逝去的感伤 2020-12-05 06:37

I have tried this code

Cursor c=db.rawQuery("SELECT name FROM sqlite_master WHERE type = \'table\'",null);
c.moveToFirst();
while(!c.isAfterLast()){         


        
5条回答
  •  天涯浪人
    2020-12-05 07:00

    Change your sql string to this one:

    "SELECT name FROM sqlite_master WHERE type='table' AND name!='android_metadata' order by name"

提交回复
热议问题