当前位置: 代码迷 >> SQL >> sqlite3 表构造查询
  详细解决方案

sqlite3 表构造查询

热度:70   发布时间:2016-05-05 12:33:07.0
sqlite3 表结构查询


命令行查看sqlite3表结构的命令


sqlite3 xxxxx.db
SQLite version 3.7.15.1 2012-12-19 20:39:10
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> 




方法1 

sqlite> .select * from sqlite_master where type="table";


方法2

sqlite> .schema [表名]   

默认输出所有的表, 建SQL语句。


推荐方法2