Where clause priority in Select Query
525916Oct 9 2006 — edited Oct 9 2006Hi All,
I have one doubt, Pls clarify
SELECT empno, ename, sal, comm
FROM emp E, dept D -- (deptno is pk for DEPT)
WHERE D.deptno = E.deptno
AND E.sal >= 3000
In WHERE clause which one will execute first (right to left or left to right
OR[b] First join conditions then after filter conditions or vice versa)
D.deptno = E.deptno
OR
E.sal >= 3000
(this is the example tables)
Because I have large volume of data with 5 tables with joins
so, pls. kindly give me the sugession for where clause.
Thanks
Naresh