一安装
https://www.runoob.com/sqlite/sqlite-create-table.html
sqlite3
.quit
二:建表
sqlite3 testDb.db
.tables 查看表中的内容
CREATE TABLE stu(
Id int PRIMARY KEY not null,
name char(30) not null,
age int ,
sex int
);
CREATE TABLE 表名(
字段1 数据类型 主键,是唯一的 不为空,
字段2 数据类型 not null, 这里常用varchar age int,
sex int
);

删除表的命令:
DROP TABLE 表名
//插入数据
insert into stu (id,name,age,sex)
values(1,’小明’,23,1);
Insert into 表名 (字段1值,字段2值,字段3值,字段4值)
Values(字段1值,字段2值,字段3值,字段4值);
//查询语句
select * from 表名
*代表全查
//条件查询
select * from stu where id=1;

//删除一个数据
delete from stu where id =2;
//修改语句
updata 表名
set 字段名 =0
where 字段1= 1; //这个相当于条件
updata stu set sex =0 ,age =21 where id= 1;
本文作者为一木,转载请注明。
很简单但是你用心记录了
@打桩木谢谢,这是以前记录的,怕以后用到