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: sim <jmenker_at_muenster.de>
Date: 8 Jun 2006 02:14:24 -0700
Message-ID: <1149758064.594532.85260@c74g2000cwc.googlegroups.com>

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 - 04:14:24 CDT

Original text of this message

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