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: sql to see all diff between two table

Re: sql to see all diff between two table

From: Gombos Bertalan <bgombos_at_freemail.hu>
Date: Fri, 29 Sep 2000 10:58:51 +0200
Message-ID: <39D459CB.DE0CB458@freemail.hu>

(
select 1, t.*
from table1 t
minus
select 1, t.*
from table2 t
)
union
(
select 2, t.*
from table2 t
minus
select 2, t.*
from table1 t
)

xgong wrote:
>
> I have duplicated table, table1 and table2. Then table2 has been updated
> with some fields.
> How to get the all diff between two tables using sql?
>
> following does not work for me:
>
> select * from table1 where * not in (select * from table2)
>
> thank you for your help!
>
> ydeng

-- 
  -+==-.
   |   |                      |
   |==-+-=-+- -+===- -+==+- -=+==-         G o m b o s  B e r t a l a n
   |       |   |=-    |  '    |
  -|-=====-+- -+===-  |      -+==-          mailto:bgombos_at_freemail.hu
   '       '   '      '       '                 GSM:+36 20 9293612
Received on Fri Sep 29 2000 - 03:58:51 CDT

Original text of this message

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