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: MINUS works, but is there a faster way?

Re: MINUS works, but is there a faster way?

From: Grinalds <g.geks_at_konts.lv>
Date: Mon, 28 Dec 1998 10:04:57 +0200
Message-ID: <767ds5$ed@news.latnet.lv>


>
>You could try something like this:
>insert into schema2.tablename
>select tablename_pk ,rest of columns from schema1.tablename A
> where not exists (select 'x' from schema2.tablename B
> where B.tablename_pk = A.tablename_pk);
>

You can also sink about this:

insert into schema2.tablename
select tablename_pk ,rest of columns from schema1.tablename A, schema2.tablename B

   where B.tablename_pk= A.tablename_pk(+) AND B.tablename_pk IS NULL Received on Mon Dec 28 1998 - 02:04:57 CST

Original text of this message

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