Re: Nested Select and Joins

From: Arvind Balraman <dnivra_at_ix.netcom.com>
Date: 1998/03/03
Message-ID: <34FC9010.C8AD321D_at_ix.netcom.com>#1/1


[Quoted] Actually there are 5 types of select

simple select



select *

   from emp

nested select or sub select



select *
  from emp
 where deptno in (select *
                             from dept
                           where location='london');
the rdbms engine first evaluates the subquery first ie the dept query and then the outer query ie the emp query

corelated sub-select



select a.*
  from emp a
   where a.deptno in (select b.deptno
                                  from dept b
                                where a.dept_no = b.deptno)

in this case the inner query refers a column from the outer query and the rdbms engine first evaluates the outer query ie the emp query and the inner query(ie the dept query) later.

Ashish Kumar Hairat wrote:

> Can somebody tell me what is nested select and its advantages? and also
> what is the difference between outer join, inner join and equi join?
>
> Thanks

--
Balaraman Arvind
151 Andrew Ave, Apt 215
Naugatuck, CT 06770

ph   -  (203)-723-1190(R)
     -  (203)-459-7502(O)

mail -  dnivra_at_ix.netcom.com (R)
        abalaram_at_oxhp.com    (O)
Received on Tue Mar 03 1998 - 00:00:00 CET

Original text of this message