Re: Nested Select and Joins

From: Paul Brewer <paulb_at_pbrewer.demon.co.uk>
Date: 1998/03/04
Message-ID: <W1JkRDA8Vb$0EwBQ_at_pbrewer.demon.co.uk>#1/1


In article <34FC9010.C8AD321D_at_ix.netcom.com>, Arvind Balraman <dnivra_at_ix.netcom.com> writes
>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)
>
>
 Don't forget in-line views (select from select) - can be rather useful!

-- 
Paul Brewer
Received on Wed Mar 04 1998 - 00:00:00 CET

Original text of this message