title: How to use intersect (and maybe minus) on this example
body: <p>lets say I have two tables:</p>
  
  <pre><code>TableA
  ID,    Time,   Size
  
  0      5:00    600
  1      8:00    800
  2      7:00    100
  3      1:50    140
  4      2:40    300 
  12     3:40    300
  
  TableB
  ID,    Time,   Size
  
  8      5:00    600
  1      8:00    800
  2      8:00    900
  3      1:50    140
  5      2:40    300 
  12     3:40    300 
  </code></pre>
  
  <p>Now I would like to compare these two Tables: give all rows from Table A and B where the IDs are same (or lets say where the IDs are existing in both of the Tables) but lower then 12 - so that would kick out table A <code>ID 0, 4, 12</code> and from table B <code>ID 8, 5, 12</code></p>
  
  <p>After that I would have only 3 rows left. Now I would like to kick out all rows where there is one or more difference between the whole TableA row ID == TableB row ID</p>
  
  <p>At the end there would be (if I see that correct) as output:</p>
  
  <pre><code>ID,    Time,   Size
  1      8:00    800
  3      1:50    140
  </code></pre>
  
  <p>For this solution I need for sure intersect and maybe minus. At first I tought this SQL statement would do what I want:</p>
  
  <pre><code>select * from TableA where ID &lt; 12 intersect select * from TableB where ID &lt; 12 
  minus 
  select * from TableB where ID &lt; 12;
  </code></pre>
  
  <p>But this is not working that well. Ist because of the intersect, Im using intersect for the whole row, I should use intersect for only the IDs and IF I have the intersect of the IDs (that would be 1,2,3) then I have to use ID <code>TableA with ID 1,2,3</code> <strong>minus</strong> <code>TableB with ID 1,2,3</code>. But how? Or do I miss something? Any ideas? Thank you</p>