Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: optimal sql
"Christoph Seidel" <chris666.seidel_at_gmx.de> wrote in message
news:at31k8$vtma0$1_at_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?
Because , since it is a primary key, there can only ever be one match. As Alex says Oracle will search the unique index to fnd it.
-- Niall Litchfield Oracle DBA Audit Commission UK ***************************************** Please include version and platform and SQL where applicable It makes life easier and increases the likelihood of a good answer ******************************************Received on Sun Dec 15 2002 - 15:57:01 CST