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: SQL Select statement question ...

Re: SQL Select statement question ...

From: Pablo Sanchez <pablo_at_dev.null>
Date: Sun, 10 Nov 2002 06:13:49 GMT
Message-ID: <Xns92C1E222EC1B8pingottpingottbah@209.242.64.107>


Avi Abrami <aabrami_at_intersystemsww.com> wrote in news:3DCDE953.11FEB3E9 @intersystemsww.com:

> [Multiple top-posted replies re-arranged]
>
> Robbert Van der Hoorn wrote:

>> 
>> "Martin Doherty" <martin.doherty_at_elcaro.moc> schreef in bericht
>> news:SeJy9.4$x86.354_at_news.oracle.com...
>>
>> > Yasuki Izaki wrote:
>> >
>> > >I'm looking for a sample SQL statement to select KEY field from
>> > > tableA where KEY field does not exist in tableB?

Try a NULL outer join, that seems to work best across the board. The idea is to join the two tables and check for NOT NULL on the main column:

    select ... where col IS NOT NULL ....

Details left to the reader. :)

-- 
Pablo Sanchez, High-Performance Database Engineering
http://www.hpdbe.com
Received on Sun Nov 10 2002 - 00:13:49 CST

Original text of this message

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