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: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Mon, 09 Dec 2002 13:17:21 +0200
Message-ID: <at1u7r$9ob$1@ctb-nnrp2.saix.net>


Christoph Seidel 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

--
Billy
Received on Mon Dec 09 2002 - 05:17:21 CST

Original text of this message

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