Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: optimal sql
Billy Verreynne wrote:
>> how can i find all records by pk in table 1 which are not in table 2
>
> I usually use something like:
>
> SELECT
> t1.key1,
> t1.key2
> FROM table1 t1
> MINUS
> SELECT
> t2.key1,
> t2.key2
> FROM table1 t2
is this more efficient than not in or not exists?
and: this assumes that t1 and t2 have the same fields to select? Received on Mon Dec 09 2002 - 05:24:05 CST