Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to use an nested table as a subquery?

Re: How to use an nested table as a subquery?

From: Marc Fleischeuers <Marc.Fleischeuers_at_kub.no-spam.nl>
Date: 11 Dec 1998 09:42:24 +0100
Message-ID: <u67bj6pe7.fsf@kub.nl>


Lutz Heermann <wkst1.ik6_at_mchp.siemens.de> writes:

> Hi everybody,
>
> So this is my proplem:
> I've got an table which I wan't to reverence by an column called id
> and I've got an nested table which holds some id's.
> How can use the nested table as a subquery, so that i can choose all rows from
> the table which have an id contained in the nested table:
>

select * from supertable p
where exists (select 1 from subtable b where p.id = b.id)

That's only one of many ways to do this, though.

Marc
--
This question has exactly one correct answer. Which one? A) A or B; B) B or C; C) C.

Received on Fri Dec 11 1998 - 02:42:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US