1.进入sqlite3
sqlite3
sqlite3 student //将数据库保存成文件
2.退出sqlite3
.exit
3.创建表
create table student(id integer, name text, age integer);
create table if not exists student(id integer, name text, age integer);
4.查看表结构
.schema
5.插入数据
insert into student (id, name, age) values(1, "jack", 18);
insert into student values (2, "cooper", 19),(3, "xiaoming", 16);
6.查询数据
select * from student;
7.修改数据
update student set age = 10 where id = 1;
8.删除表
drop table student;