sql 语句的执行顺序

(1) from 
(3) join 
(2) on  
(4) where 
(5) group by(这里写开始使用select中的别名,后面的语句中都可以使用)
(6) avg,sum.... 
(7) having 
(8) select 
(9) distinct 
(10) order by 

写的顺序:select... from... where.... group by... having... connt(Email)>1, order by.. limit [offset,] 
(rows)
执行顺序:from... where... group by... having.... select ... order by... limit

详细过程:https://www.cnblogs.com/yyjie/p/7788428.html

posted @ 2020-09-27 22:26  童年の波鞋  阅读(12)  评论(0编辑  收藏  举报