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: How to compare two ALMOST identical tables...

Re: How to compare two ALMOST identical tables...

From: <derek.google_at_grog.net>
Date: 8 Jun 2006 13:20:34 -0700
Message-ID: <1149798034.135395.235200@g10g2000cwb.googlegroups.com>


Thanks. I went the ALL_TAB_COLUMNS route. Not the easiest PL/SQL, but it got the job done.

sim wrote:
> derek.google_at_grog.net schrieb:
> [...]
> >
> > And I can't simply list the columns I do want (i.e., A, B, C) or create
> > views because this procedure must be general enough to run on scores of
> > table pairs in a very large database.
> >
> > Any hints appreciated on what a general PL/SQL solution might look
> > like.
> [...]
>
> Hello Derek,
>
> you can use minus for that purpose.
>
> select a,b,c from table1 minus select a,b,c from table2 and don't
> forget to do it the other way around also: select a,b,c from table2
> minus select a,b,c from table1.
> To make the solution more general you could read the column names from
> one of the appropriate system views like ALL_TAB_COLS or
> ALL_TAB_COLUMNS.
>
> Regards,
>
> Jörg
Received on Thu Jun 08 2006 - 15:20:34 CDT

Original text of this message

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