Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: optimal sql
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