增
insert into table (name,sex,age) value(‘张三‘,‘男’,‘20’) 向表中的name,sex,age,分别添加张三,男,20的内容
查
select “要查找的东西” from "从哪一个表查" *代表所有
select name where table where name=‘肖淇‘ 在表中查询名字为肖淇的内容
删
delete from table where name=‘肖淇‘ 在表中删除名字为肖淇的内容
delete from table 删除整个表中的内容
改
update table name=‘张三‘ where name=‘肖淇‘ 将表中名字为肖淇的内容改为张三
拓展:
排序
select * from table order by age 查询表中所有信息,并按年级升序排序
select * from table order by age desc 查询表中所有信息,并按年级降序排序
返回唯一不同的值
原文:https://www.cnblogs.com/xiaopo/p/14715495.html