创建库:.open 库名;
例:.open student.db;
创建表:create table 表名(元素名 元素类型 元素附加属性,元素名 元素类型);
例:create table student(id integer primary key autoincrement, name text, age int);
增加:insert into 表名(元素名,元素名…) VALUES(元素值,元素值…);
例:insert into student(name, age) VALUES(“小六”, 16);
例:insert into student VALUES(1, “小六”, 16);
删除:delete from 表名 where 条件;
例:delete from student where id=1;
修改:update 表名 set 元素=元素值 where 条件;
例:update student set age=17 where id=1;
查找:select 元素 from 表名 where 条件;
例:select name from student where id=1;
例:select * from student;
配置:
.header on//显示表头
.mode column//列对齐
.timer on//显示操作耗时