title: Update multiple rows for 2 columns in MySQL
body: <p>Follow up to <a href="https://stackoverflow.com/questions/9346755/update-multiple-rows-in-1-column-in-mysql">Update multiple rows in 1 column in MySQL</a>.</p>
  
  <p>What is the most efficient query for updating multiple rows in 2 columns? </p>
  
  <pre><code>UPDATE example_table SET variable1 = 12 WHERE id=1;
  UPDATE example_table SET variable2 = 'blue' WHERE id=1;
  
  UPDATE example_table SET variable1 = 42 WHERE id=2;
  UPDATE example_table SET variable2 = 'red' WHERE id=2;
  
  UPDATE example_table SET variable1 = 32 WHERE id=3;
  UPDATE example_table SET variable2 = 'yellow' WHERE id=3;
  </code></pre>
  
  <p>Using <code>case</code> seems to be the most efficient, but how would I do it with multiple values being set at one time?</p>