sqlite总结1

I Shell下命令行程序CLP

I .help

II 命令的简写

.e = .quit

.s

.h = .help

II 数据库管理

A 创建数据库

1 CREATE TABLE id_name(id integer,name text);

2 列默认设置为自动增长属性

B 数据显示格式

1 .mode 命令

2 命令有:
csv Comma-separated values
column Left-aligned columns. (See .width)
html HTML <table> code
insert SQL insert statements for TABLE
line One value per line
list Values delimited by .separator string
tabs Tab-separated values
tcl TCL list elements

3 .headers on

C 获得数据库的schema信息

1 .tables [pattern]

D 导出数据

1 sqlite> .output iuc.sql
sqlite> .dump
sqlite> .output stdout

E 导入数据

1 sqlite> .read iuc.sql

F 格式化

1 sqlite> .prompt 'wangkaixuan>>'

G 导出带分隔符的数据

1 sqlite> .separator ,

2 sqlite> select * from id_name;

3 sqlite> .output stdout

posted @ 2015-09-27 00:36  iucforever  阅读(154)  评论(0编辑  收藏  举报