Interviews6 answers
Considering SELECT statement, in which order the query clauses are logically processed?
6 Answers
From
On
Outer
where
group by
rollup cube
Having
select
Distinct
order by
top
Sanjeev KumarPosted Jul 18, 2016, 10:05 PM EDT
From
On
Outer
where
group by
rollup cube
Having
select
Distinct
order by
top
Sanjeev KumarPosted Jul 18, 2016, 10:05 PM EDT
From
On
Outer
where
group by
rollup cube
Having
select
Distinct
order by
top
Sanjeev KumarPosted Jul 18, 2016, 10:05 PM EDT
In select Statement Order of Clauses is
From
Where
Select
Pankaj Kumar ChoudharyPosted May 13, 2015, 8:36 AM EDT
Here i am adding some more MS SQL Server objects logical execution order.
1. FROM
2. ON
3. OUTER
4. WHERE
5. GROUP BY
6. CUBE | ROLLUP
7. HAVING
8. SELECT
9. DISTINCT
10 ORDER BY
11. TOP
Reference from blog.sqlauthority.com
Nagi APosted Sep 26, 2014, 2:43 AM EDT
The clauses are logically processed in following order:
1. FROM
2. WHERE
3. GROUP BY
4. HAVING
5. SELECT
6. ORDER BY
1. FROM
2. WHERE
3. GROUP BY
4. HAVING
5. SELECT
6. ORDER BY
Akshay PatelPosted Aug 4, 2012, 10:49 PM EDT



