`

查询的逻辑执行过程

阅读更多
--查询的逻辑执行过程
(8)  SELECT (9) DISTINCT (11) <TOP_specification> <select_list> 
(1)  FROM <left_table> 
(3)    <join_type> JOIN <right_table> 
(2)      ON <join_condition> 
(4)  WHERE <where_condition> 
(5)  GROUP BY <group_by_list> 
(6)  WITH {CUBE | ROLLUP} 
(7)  HAVING <having_condition> 
(10) ORDER BY <order_by_list> 


sql语句顺序 写的顺序:select ... from... where.... group by... having... order by..
执行顺序:from... where...group by... having.... select ... order by...
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics