您的位置:首页 > 博客中心 > 数据库 >

mysql查询处理顺序

时间:2022-03-14 02:14

http://zhangzhaoaaa.iteye.com/blog/1689412参考:《MYSQL技术内幕SQL编程》

select distinct <selectlist>

from lefttable

<join-type>join <righttable>

on <join_condition>

where<where_condition>

group by<groupbylist>

with{CUBE|ROLLUP}

HAVING<havingcondition>

order by<orderbylist>

limit<limitnumber>

处理顺序

 

  1. from
  2. on
  3. join
  4. where
  5. group by
  6. cube|rollup
  7. having
  8. select
  9. distinct
  10. order by
  11. limit

热门排行

今日推荐

热门手游