Re: compare tables

From: <jamiet_at_nycap.rr.com>
Date: Mon, 02 Apr 2001 02:07:48 GMT
Message-ID: <monfctkl8tli25fiskh8uttgtlql6cj8l4_at_4ax.com>


"loomis" <loomis_at_abcd.com> wrotd:

>can someone please tell me how I can compare two table to make sure they
>have the same data?
>If a row does not match, then throw an exception. I am new to using oracle
>8.
>
>LL,
>

You could use the minus operator of SQL

select * from table_A
minus
select * from table_B;

and then

select * from table_B
minus
select * from table_A;

If no rows are returned for either query, then the tables are identical. Received on Mon Apr 02 2001 - 04:07:48 CEST

Original text of this message