title: efficient way to compare two tables in bigquery
body: <p>I am interested in comparing, whether two tables contain the same data.</p>
  
  <p>I could do it like this:</p>
  
  <pre><code>#standardSQL
  SELECT
      key1, key2
  FROM
  (
      SELECT 
      table1.key1,
      table1.key2,
      table1.column1 - table2.column1 as col1,
      table1.col2 - table2.col2 as col2
      FROM
          `table1` AS table1
      LEFT JOIN
          `table2` AS table2
      ON
          table1.key1 = table2.key1
      AND
          table1.key2 = table2.key2
  )
  WHERE 
      col1 != 0
  OR
      col2 != 0
  </code></pre>
  
  <p>But when I want to compare all numerical columns, this is kind of hard, especially if I want to do it for multiple table combinations.</p>
  
  <p>Therefore my question: Is someone aware of a possibility to iterate over all numerical columns and restrict the result set to those keys where any of these differences where not zero?</p>