sqlite使用小结

官方网站 http://www.sqlite.org/index.html

图形前端 http://www.sqlabs.net/sqlitemanager.php

个人觉得firefox的sqlite db插件也挺好用

 

1. 创建新数据库

sqlite3 test.db

2. 创建新表

create table table1( id varchar(10), name varchar(10));

3. 查看数据库中有哪些表

.tables

4. 插入数据

INSERT INTO table1 VALUES(1,'John');

5. 查询数据

select * from table1;

6. 更新数据

update table1 set name='Lili' where id=1;

7. 删除数据

delete from table1 where id=1;

8. 删除表

drop table table1;

9. 查看所有表配置信息

select * from sqlite_master;

10. 查看所有的表的创建语句

.schema

11. 输出模式

.mode list
.mode csv
posted @ 2013-11-13 21:38  Ario  阅读(191)  评论(0编辑  收藏  举报