title: Is there a quick way to compare two equally formatted tables in SQL?
body: <p>I would like to make an SQL query to compare two tables with identical columns, both names and types. Each table has a unique key. I want the query to return any rows that contain unequal values. I know could do something like this</p>
  
  <pre><code>select * 
  from table_1, table_2
  where 
  table_1.key = table_2.key
  and (
   table_1.col1 != table_2.col1 OR
   table_1.col2 != table_2.col2 OR
   ...
  
  )
  </code></pre>
  
  <p>but this would be tedious since there are a large and potentially variable number of columns.</p>
  
  <p><strong>edit</strong></p>
  
  <p>If it helps, I'm using a tsql system.</p>