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