title: Oracle SQL UNION ALL where T1.ID <> T2.ID
body: <p>I have two tables <code>Test_Table</code> and <code>Test_Table2</code>. I want the <code>UNION ALL</code> or <code>UNION</code> of the two but I only want the rows from <code>TEST_TABLE2</code> that I do not have an ID for in <code>TEST_TABLE</code>. IDs could be unique to either table or exist in both tables as they are populated from two different systems.</p>
  
  <p>I have been running this statement and then just handling the duplicate IDs down the road but I would like there not to be duplicate IDs.</p>
  
  <pre><code>SELECT ID, DATE_VALUE, TEXT_VALUE, TABLESOURCE FROM TEST_TABLE
  UNION
  SELECT ID, OTHER_DATE_VALUE AS DATE_VALUE, OTHER_TEXT_VALUE AS TEXT_VALUE, TABLESOURCE FROM TEST_TABLE2;
  </code></pre>
  
  <p>Here are the tables.</p>
  
  <p><a href="http://sqlfiddle.com/#!2/2db484/2" rel="nofollow">http://sqlfiddle.com/#!2/2db484/2</a></p>
  
  <p>I am using <strong><em>"Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production"</em></strong></p>
  
  <p>I have not been able to get the SQL to do this. How can I get these rows.</p>