SQL概念顺序评估 [英] SQL Conceptual Order Evaluation
本文介绍了SQL概念顺序评估的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以解释一下SELECT语句的执行的概念顺序是什么,请提供一个示例吗?
Can someone explain, what is conceptual order of execution of a SELECT statement and provide an example of one please?
我已经在Google上进行过搜索,但是他们似乎都使用了相同的示例,而没有详尽的解释.
I've searched on Google but they all seem to use the same example without thorough explanation.
推荐答案
从概念上讲,按以下顺序评估select
查询:
A select
query is evaluated, conceptually, in the following order:
-
from
子句 -
where
子句 -
group by
子句 -
having
子句 -
select
子句 -
order by
子句
- The
from
clause - The
where
clause - The
group by
clause - The
having
clause - The
select
clause - The
order by
clause
这是概念性"处理,它解释了SQL的一些作用域规则.实际上,查询的执行方式可能会有所不同.
This is "conceptual" processing and explains some of the scoping rules of SQL. The way queries are executed in practice may differ.
SQL Server文档在此处进行了说明.
SQL Server documentation explains this ordering here.
这篇关于SQL概念顺序评估的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文