sql的执行流程

mysql中的SQL语句执行是有一定顺序的,如下:
1. from
2. on
3. join
4. where
5. group by
6. with
7. having
8. select
9. distinct
10. order by
11. limit

一条SQL会经过这11步的,中间的每一步都会生成一张虚拟表,后面的步骤都是在上一张虚拟表中进行筛选与查询的

猜你喜欢

转载自www.cnblogs.com/coder-lzh/p/9188427.html
今日推荐