前言:
sqlite3是linux上的小型数据库,一个文件就是一个数据库。
1、安装:
sudo apt-get install sqlite3
2、常用命令:
.tables //显示数据库中所有的表
.schema //显示所有的表的创建语句
.schema tableX //显示表tableX的创建语句
.quit //退出
3、使用例子:
sqlite3 test.db //创建一个数据库,存在则打开
sqlite> create table new(one varchar(10), two smallint);
sqlite>insert into new values('yes', 10);
sqlite>insert into new values('yes2', 20);
sqlite>select *from new;//查找所有内容
网友评论