欢迎投稿

今日深度:

SQLite查看数据表信息,sqlite查看数据

SQLite查看数据表信息,sqlite查看数据


  1. sqlite>.tables                                                --查看当前数据库所有表  
  2. sqlite>.tables table_name                                     --查看当前数据库指定表
  3. sqlite>.schema                                                --查看当前数据库所有表的建表(CREATE)语句 
  4. sqlite>.schema table_name                                     --查看指定数据表的建表语句 
  5. sqlite>select * from sqlite_master from;                      --查看所有表结构及索引信息 
  6. sqlite>select * from sqlite_master where type='table';        --查看所有表结构信息 
  7. sqlite>select name from sqlite_master where type='table';     --对于表来说,name字段指表名,查询所有表
  8. sqlite>select * from sqlite_master where type='table' and name='table_name';     --查看指定表结构信息 
  9. sqlite>select * from sqlite_master where type='index';        --查看所有表索引信息,查询所有索引 
  10. sqlite>select name from sqlite_master where type='table';     --对于索引来说,name字段指索引名
  11. sqlite>select * from sqlite_master where type='index' and name='table_name'; --查看指定表索引信息
  12. sqlite>pragma table_info ('table_name')                       --查看指定表所有字段信息,类似于msyql:desc table_name
  13. sqlite>select typeof('column') from table_name;               --查看指定表字段【column】类型,括号内可不输引号 

www.htsjk.Com true http://www.htsjk.com/SQLite/33776.html NewsArticle SQLite查看数据表信息,sqlite查看数据 sqlite.tables                                                --查看当前数据库所有表   sqlite.tables table_name           ...
相关文章
    暂无相关文章
评论暂时关闭