时间:2021-07-01 10:21:17 帮助过:43人阅读
select filed1,filed2... form table
where ...
group by ...
having ....
order by ...
limit ...
from
where
group by
having
select
distinct
order by
limit
1.找到表:from
2.拿着where指定的约束条件,去文件/表中取出一条条记录
3.将取出的一条条记录进行分组group by,如果没有group by,则整体作为一组
4.将分组的结果进行having过滤
5.执行select
6.去重
7.将结果按条件排序:order by
8.限制结果的显示条数
mysql select 操作优先级
标签:led file 单表查询 操作 select 单表 去重 for 关键词