title: INTERSECT and UNION giving different counts of duplicate rows
body: <p>I have two tables A and B with same column names. I have to combine them into table C</p>
  
  <p>when I am running following query, the count is not matching - </p>
  
  <pre><code>select * into C
  from 
  (
  select * from A
  union
  select * from B
  )X
  </code></pre>
  
  <p>The record count of C is not matching with A and B. There is difference of 89 rows. So I figured out that there are duplicates.
  I used following query to find duplicates -</p>
  
  <pre><code>select * from A 
  INTERSECT
  select * from B
  
  -- 80 rows returned
  </code></pre>
  
  <p>Can anybody tell me why intersect returns 80 dups whereas count difference on using union is 89 ?</p>