#增 insert into 表名 values(),(),(); #删 1.delete from 表名 where 条件; 2.delete from 表名 清空表;#如果设置成主键自增,则会接着增加 truncate from 表名;即可 #改 update 表名 set 字段=新的值 where 条件;
#单表查询语法 select distinct(去重) 字段名 from 表名 where 条件 group by分组 having 筛选 order by排序 limit 限制条数 #单表查询关键字顺序: from#先找到表 where#根据条件取出记录 group by#将取出的数据进行group by select#执行select去重 distinct having#分组的结果在筛选 order by#再将结果进行排序 limit#限制条数
原文:https://www.cnblogs.com/liuer-mihou/p/10490081.html