转自:http://blog.sina.com.cn/s/blog_77eab95f0101t8qp.html
查询table,type段是'table',name段是table的名字,so:
select name from sqlite_master where type='table' order by name;
@H_403_37@
查询indices,type段是'index',name是index的名字,tbl_name是index所拥有的table的名字
通过以下语句可查询出某个表的所有字段信息
PRAGMA table_info([tablename])
如果在程序中你可以通过sqlite_master@H_403_37@表得到所有表的信息。
sqlite> select type,name,tbl_name from sqlite_master order by type;
type|name|tbl_name
index|sqlite_autoindex_t1_1|t1
index|sqlite_autoindex_numtable_1|numtable
table|t1|t1
table|numtable|numtable
table|test|test
table|sqlite_stat1|sqlite_stat1
table|MailLabel|MailLabel
sqlite>
sqlite Master Table Schema
-----------------------------------------------------------------
Name@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@Description
type@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@The object’s type (table,index,view,trigger)
name@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@The object’s name
tbl_name@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@The table the object is associated with
rootpage@H_403_37@@H_403_37@@H_403_37@@H_403_37@@H_403_37@The object’s root page index in the database (where it begins)