如何列出从sqlite的数据库表名 - Android电子
问题描述:
我是新到Android源码。我想住在一个特定的数据库表的列表。这是可能的sqlite的。任何人都可以指导我在此。我搜索这么久的时间,力得到任何想法。
I am new to android sqlite. i want to get list of table residing in one particular database. Is this possible in sqlite. Can anyone guide me on this. I searched long time for this, dint get any idea.
例如:
我的数据库名字为ABC,因为我有10个不同的表,我想从那个特定的数据库表名的列表。在此先感谢
For example : My dB name is ABC, in that i have 10 different tables, i want to get the list of table names from that particular Db. Thanks in advance
答
您需要查询的模式的 SQLITE_MASTER
表 ABC
。
You need to query the sqlite_master
table of the schema ABC
.
SELECT * FROM ABC.sqlite_master WHERE type='table';