SQL概念顺序评估 [英] SQL Conceptual Order Evaluation

查看:121
本文介绍了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:

  1. from子句
  2. where子句
  3. group by子句
  4. having子句
  5. select子句
  6. order by子句
  1. The from clause
  2. The where clause
  3. The group by clause
  4. The having clause
  5. The select clause
  6. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆