Comparison of two tables
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Comparison of two tables

  1. #1
    Join Date
    Sep 2005
    Posts
    6

    Comparison of two tables

    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.

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,136
    Quote Originally Posted by raghu_vnin
    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

  3. #3
    Join Date
    Mar 2000
    Location
    Atlanta, GA,USA
    Posts
    155
    Use DBMS_RECTIFIER_DIFF package.

    Sergey

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width