Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to compare two ALMOST identical tables...
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
![]() |
![]() |