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
In article <39D459CB.DE0CB458_at_freemail.hu>,
Gombos Bertalan <bgombos_at_freemail.hu> wrote:
> (
> 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
> )
Can you do just a single column comparison between the tables? for example if there is a column called "item_id" run a statement that says
select * from table1 where item_id not in(select item_id from table2)?
in my experience I would usually do primary key comparisons in this manner, to find info that was in one table and not the other. (bearing in mind I am used to sybase/mssql7, and not oracle, so this point may be moot)
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Sep 29 2000 - 12:48:08 CDT
![]() |
![]() |