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: Christoph Seidel <chris666.seidel_at_gmx.de>
Date: Mon, 9 Dec 2002 22:22:54 +0100
Message-ID: <at31k8$vtma0$1@ID-143718.news.dfncis.de>


Alex Filonov wrote:

> If I understand it right, pk column is a primary key in the second
> table as well.

yes

> In this case, there is no difference between not in and
> not exists.

why?

> BTW, in some cases the most efficient statment would be:
>
> select * from t1
> where t1.pk in
> (select pk from t1
> minus
> select pk from t2)

thx Received on Mon Dec 09 2002 - 15:22:54 CST

Original text of this message

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