Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: and / where
Ed Prochak schrieb:
> BigLearner wrote:
>
> If you are joining tables on more than one column, then you can have
> AND in the JOIN also
>
> SELECT *
> FROM a JOIN b ON a.group=b.grpid AND a.lastname=b.grpname
> WHERE a.start = sysdate AND b.rank>12 ;
>
> It is like the style choice of writing a FOR loop or a WHILE loop.
>
For *outer joins* the difference however may be not so subtle. Consider
select ename,job,dname
from emp e
right outer join
dept d on e.deptno = d.deptno
where dname is not null
and e.job='CLERK';
against
select ename,job,dname
from emp e
right outer join
dept d on e.deptno = d.deptno and e.job='CLERK'
where dname is not null;
Best regards
Maxim Received on Wed Dec 06 2006 - 12:58:46 CST
![]() |
![]() |