title: SQL Update - Multiple Columns
body: <p>I would like to update multiple columns in a table based on values from a second table using a <code>Select</code> statement to obtain the values like this:</p>
  
  <pre><code>UPDATE tbl1 
  SET (col1, col2, col3) = (SELECT colA, colB, colC 
                            FROM tbl2 
                            WHERE tbl2.id = 'someid') 
  WHERE tbl1.id = 'differentid'
  </code></pre>
  
  <p>However, it doesn't seem as though it's possible to 'SET' more than one column name - are there alternatives rather than writing separate update statements for each column?</p>
  
  <pre><code>UPDATE tbl1 
  SET col1 = (SELECT colA FROM tbl2 WHERE tbl2.id = 'someid') 
  WHERE tbl1.id = 'differentid'
  
  UPDATE tbl1 
  SET col2 = (SELECT colB FROM tbl2 WHERE tbl2.id = 'someid') 
  WHERE tbl1.id = 'differentid'
  
  UPDATE tbl1 
  SET col3 = (SELECT colC FROM tbl2 WHERE tbl2.id = 'someid') 
  WHERE tbl1.id = 'differentid'
  </code></pre>