title: Verify two columns of two different tables match exactly
body: <p>When writing views and nesting views within deeper views I sometimes miss something and end up losing rows/data.  How can I check that columns from two different tables have an exact match of data?</p>
  
  <p>Example:</p>
  
  <pre><code>select count(distinct table1.col1)
    from table1
   where table1.col1 not in (select distinct table2.col1 
                               from table2);
  </code></pre>
  
  <p>This would return the number of values in table1.col1 that are not in table2.  However, I don't know that this is a good solution as it doesn't count the table2.col1 values that do not exist in table1.col1.</p>