Re: Q: Comparing two tables in Oracle
Date: 1995/05/01
Message-ID: <jvgreco.43.05A52BDB_at_primenet.com>#1/1
In article <3npfb4$mki_at_oznet03.ozemail.com.au> npbs_at_ozemail.com.au (Newcastle Permanent Building Society) writes:
_ text ommitted -
One way to compare the contents of 2 tables ( either in same tablespace or not ) is to use the intersection operators :
To find if different try-
create table test_output as
select * from orig_table minus
select * from new_table;
If test_output has any rows then they are ones in the orig_table that were not in the new_table... you can then look at them to compare and to see what caused the failure.
NOTE: this will only work is ALL fields ( including type) are identical in both tables.
If you reverse the order of the sql statement you can see if any new stuff was created in new_table.
Hope this helps :-).
TurkBear
aka John Greco
Oracle DBA ( 7.1.4, Netware)
Received on Mon May 01 1995 - 00:00:00 CEST