title: Merge table, track non-matches
body: <p>I'm updating table A with table B (a temp table build from a csv file). B might contain records not found in A, if that's the case then I need to know. So either I need the record from B deleted after A is updated, or output B record when no match is found in A.  I've never used MERGE before and just can't seem to get the syntax correct.</p>
  
  <pre><code>MERGE INTO table_A
  USING table_B
  ON table_A.id = table_B.id
  WHEN MATCHED AND table_A.account = 2 THEN
      UPDATE SET
          tableA.col2 = tableB.col2,
          tableA.col3 = tableB.col3
      DELETE;
  
  
  SELECT *
  FROM table_B
  </code></pre>