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

Home -> Community -> Usenet -> c.d.o.server -> Re: optimal sql

Re: optimal sql

From: Dario <drga59_at_hotmail.com>
Date: 9 Dec 2002 17:07:15 -0800
Message-ID: <e409f463.0212091707.7b9ee894@posting.google.com>


You may try something like this
select *
from t1
where t1.pk1 not in (select /*+ hash_aj */ t2.pk2

                     from    t2)

"Christoph Seidel" <chris666.seidel_at_gmx.de> wrote in message news:<at1tcf$vhbot$1_at_ID-143718.news.dfncis.de>...
> how can i find all records by pk in table 1 which are not in table 2
>
> is this efficient:?
>
> select * from t1 where pk not in (select pk from t2)
Received on Mon Dec 09 2002 - 19:07:15 CST

Original text of this message

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