Which clause performs first in a SELECT
statement?
I have a doubt in select
query on this basis.
consider the below example
Logical order of query processing phases is:
FROM
- Including JOIN
sWHERE
GROUP BY
HAVING
SELECT
ORDER BY
You can have as many as conditions even on your JOIN
s or WHERE
clauses. Like:
Select * from #temp A
INNER JOIN #temp B ON A.id = B.id AND .... AND ...
INNER JOIN #temp C ON B.id = C.id AND .... AND ...
Where A.Name = 'Acb'
AND B.Name = C.Name
AND ....