Click to See Complete Forum and Search --> : Comparison of two tables


raghu_vnin
11-17-2005, 07:50 PM
Hi,

I was looking at an optimized way in pl/sql to compare the data from tables in two different databases (Oracle 9i). Is there any alternate to opening cursors for each of the two tables and looping through them?

Thank you.

tamilselvan
11-17-2005, 09:05 PM
Hi,

I was looking at an optimized way in pl/sql to compare the data from tables in two different databases (Oracle 9i). Is there any alternate to opening cursors for each of the two tables and looping through them?

Thank you.

select * from table_1
minus
select * from table_2
UNION ALL
select * from table_2
minus
select * from table_1

will do

Tamil

pss
11-21-2005, 03:19 PM
Use DBMS_RECTIFIER_DIFF package.

Sergey