1、select语句书写顺序
子句 | 说明 |
---|---|
select | 要返回的列或表达式 |
from | 从中检索数据的表 |
where | 行级过滤 |
group by | 分组说明 |
having | 组级过滤 |
order by | 输出排序顺序 |
select —> from —> where —> group by —> having —> order by
2、select语句执行顺序
from —> where —> group by —> having —> select —> order by —> limit
1、select语句书写顺序
子句 | 说明 |
---|---|
select | 要返回的列或表达式 |
from | 从中检索数据的表 |
where | 行级过滤 |
group by | 分组说明 |
having | 组级过滤 |
order by | 输出排序顺序 |
select —> from —> where —> group by —> having —> order by
2、select语句执行顺序
from —> where —> group by —> having —> select —> order by —> limit