1.步骤序号

1.1 查询的一般形式

SELECT DISTINCT <TOP_specification> <select_list>
FROM <left_table>
<join_type> JOIN <right_table>
ON <join_condition>
WHERE <where_condition>
GROUP BY <group_by_list>
WITH {CUBE | ROLLUP}
HAVING <having_condition>
ORDER BY <order_by_list>

1.2. 根据各个子句被逻辑处理的顺序附以步骤序号
步骤序号

1.3. 查询流程图
logical-query-processing

查询流程图中,ORDER BY和TOP是处理顺序是反的。"……why TOP operators come earlier than ORDER BY in the query execution plan."

引申

  1. 三值逻辑

参考资料

  1. Microsoft SQL Server 2005 技术内幕:T-SQL 查询 - Itzik Ben-Gan & Lubor Kollar & Dejan Sarka
内容来源于网络如有侵权请私信删除
你还没有登录,请先登录注册
  • 还没有人评论,欢迎说说您的想法!