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: NOT USING A NOT IN SQL

Re: NOT USING A NOT IN SQL

From: Keith McKendry <mckendry_at_execpc.com>
Date: Mon, 17 Aug 1998 15:10:08 -0500
Message-ID: <35D88E1F.C6E2C578@execpc.com>


Try

Select t1.c1
from table_1 t1, table_2 t2
where t1.c1 - t2.c2 (+)
and t2.c2 is null;

Keith McKendry
Whittman-Hart, Inc.

D S Tharpe wrote:

> What are some equivalent ways of SQL coding to avoid a 'not'
> in the following sql clause. I'm vaguely familiar with
> 'exists' and 'minus'. The rule I've heard is never use a not -
> it takes much longer to return a result. Does anyone have
> experience with not using a 'not'?
>
> select c1 from table where c1 not in(select c2 from another_table);
>
> (c1 and c2 would have similar values)
>
> Thank you in advance for any advice,
>
> D. Tharpe
Received on Mon Aug 17 1998 - 15:10:08 CDT

Original text of this message

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