mysql中查询的优先级

sql和mysql执行顺序,内部机制是一样的,最大的区别在别名上

一、sql执行顺序

1、from

2、on

3、join

4、where

5、group by(开始使用select中的别名,后面 的语句中都可以使用)

6、avg,sum.....

7、having

8、select

9、distinct

10、order by

原文地址:https://www.cnblogs.com/yanpingping/p/10777577.html