Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sql to see all diff between two table
(
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 9293612Received on Fri Sep 29 2000 - 03:58:51 CDT
![]() |
![]() |