如何列出从sqlite的数据库表名 - Android电子 [英] How to list the table name from sqlite DB -- Android

查看:113
本文介绍了如何列出从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';

这篇关于如何列出从sqlite的数据库表名 - Android电子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆