mysql中查询的优先级

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

一、sql执行顺序

1、from

2、on

3、join

4、where

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

6、avg,sum.....

7、having

8、select

扫描二维码关注公众号,回复: 6033709 查看本文章

9、distinct

10、order by

猜你喜欢

转载自www.cnblogs.com/yanpingping/p/10777577.html