sqlite经常使用命令

 1 sqlite Danger.db    //创建/打开Danger.db数据库文件
 2 .databases          //查看数据库
 3 .tables             //列出已有的表
 4 .exit               //退出
 5 
 6 
 7 select count(*)  from sqlite_master where type='table' and name = 'tablename';          //判断指定的表是否存在
 8  
 9 PRAGMA table_info([tablename])  //查询某个表中全部字段名称. PRAGMA大小写都可
10 
11 .help   //列出全部内置命令
12 .h ON   //查询时显示字段名
相关文章
相关标签/搜索