title: Comparing data in two different database
body: <p>I have two oracle databases who share database objects for example:</p>
  
  <p><strong>Table: PRICE</strong></p>
  
  <p>I am looking to come up with a efficient way of comparing the table object between the two databases. I expect them to be identical, but there can be differences as a <strong>new</strong> patch could be applied to one of the environments let's say. </p>
  
  <p>I have been looking at potential solutions and I had a look at using Oracle's <code>DBMS_COMPARISON</code> package to compare the two database on the object:</p>
  
  <p>Here is the <a href="https://docs.oracle.com/cd/E11882_01/server.112/e17516/tdpii_diverge.htm#TDPII093" rel="nofollow noreferrer">Link</a></p>
  
  <p>The issue I am having is that my requirement involves looking at <code>key</code>, <code>values</code> for each of the objects. For example:</p>
  
  <pre><code>Table   Key                          Compare
  PRICE   Code,Type,Date,Currency      Price
  USER    USER_ID                      FIRST_NAME, LAST_NAME, DOB
  </code></pre>
  
  <p>My question is...is there a way I can specify the <code>key</code> columns and specify the field to compare? Or Do I need to create <code>temp</code> tables and then compare the <code>temp</code> tables instead of the actual tables? </p>
  
  <p>I'm looking to output the column where the difference is in. Appreciate if you guys can show me an example :) </p>
  
  <p>Thanks in Advance</p>