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 12:24:05 +0100
Message-ID: <at1uho$vq9ai$1@ID-143718.news.dfncis.de>


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

Original text of this message

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