sqlite3基本操作

1、进入数据库 #sqlite3 ***.sqlite3

[root@ls_sa7enhgg results]# sqlite3 result.sqlite3
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> 

2、查询数据库:sqlite>.database

sqlite> .database
seq  name             file                                                      
---  ---------------  ----------------------------------------------------------
0    main             /root/results/result.sqlite3                              
sqlite> 

3、查询表:sqlite>.tables

sqlite> .tables
alihealth_cn

4、格式化的查询输出

sqlite> .header on
sqlite> .mode column

5、查询表的字段信息

sqlite> PRAGMA table_info(alihealth_cn);
cid         name        type        notnull     dflt_value  pk        
----------  ----------  ----------  ----------  ----------  ----------
0           id          integer     0                       1         
1           alive       int         0                       0         
2           request     int         0                       0         
3           resolve     int         0                       0         
4           url         text        0                       0         
5           subdomain   text        0                       0         
6           port        int         0                       0         
7           level       int         0                       0         
8           cname       text        0                       0         
9           ip          text        0                       0      

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值