首页 > 数据库技术 > 详细

sqlite常用命令

时间:2017-02-21 16:52:18      阅读:170      评论:0      收藏:0      [点我收藏+]
 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   //查询时显示字段名

 

sqlite常用命令

原文:http://www.cnblogs.com/haoyijing/p/6424318.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!