.mode MODE ?TABLE? 输出格式选项
csv Comma-separated values 各字段以逗号为分隔符输出 如:
sqlite> .mode csv
sqlite> select * from websites;
WebID,WebName
1,CTOChina.net
2,"搜狐"
3,"雅虎"
4,"开源"
5,"技术"
sqlite>
column Left-aligned columns. 以.width设置的宽度显示各字段 如:
sqlite> .mode column
sqlite> select * from websites;
WebID WebName
---------- ------------
1 CTOChina.net
2 搜狐
3 雅虎
4 开源
5 技术
sqlite>
html HTML <table> code html 表格格式输出 如:
sqlite> .mode html
sqlite> select * from websites;
<TR><TH>WebID</TH><TH>WebName</TH></TR>
<TR><TD>1</TD>
<TD>CTOChina.net</TD>
</TR>
<TR><TD>2</TD>
<TD>搜狐</TD>
</TR>
<TR><TD>3</TD>
<TD>雅虎</TD>
</TR>
<TR><TD>4</TD>
<TD>开源</TD>
</TR>
<TR><TD>5</TD>
<TD>技术</TD>
</TR>
sqlite>
insert SQL insert statements for TABLE 以insert SQL语句形式输出 如:
sqlite> .mode insert
sqlite> select * from websites;
INSERT INTO sql VALUES(1,'CTOChina.net');
INSERT INTO sql VALUES(2,'搜狐');
INSERT INTO sql VALUES(3,'雅虎');
INSERT INTO sql VALUES(4,'开源');
INSERT INTO sql VALUES(5,'技术');
sqlite>
line One value per line field = value的形式逐行输出 如:
sqlite> .mode line
sqlite> select * from websites;
WebID = 1
WebName = CTOChina.net
WebID = 2
WebName = 搜狐
WebID = 3
WebName = 雅虎
WebID = 4
WebName = 开源
WebID = 5
WebName = 技术
sqlite>
list Values delimited by .separator string 各字段以separator的值为分隔符输出 如:
sqlite> .mode list
sqlite> select * from websites;
WebID,WebName
1,CTOChina.net
2,搜狐
3,雅虎
4,开源
5,技术
sqlite>
tabs Tab-separated values 如:
sqlite> .mode tabs
sqlite> select * from websites;
WebID WebName
1 CTOChina.net
2 搜狐
3 雅虎
4 开源
5 技术
sqlite>
tcl TCL list elements 如:
sqlite> .mode tcl
sqlite> select * from websites;
"WebID" "WebName"
"1" "CTOChina.net"
"2" "\313\321\272\374"
"3" "\321\305\273\242"
"4" "\277\252\324\264"
"5" "\274\274\312\365"
sqlite>