title: Multiple Updates in MySQL
body: <p>I know that you can insert multiple rows at once, is there a way to update multiple rows at once (as in, in one query) in MySQL?</p>
  
  <p>Edit:
  For example I have the following</p>
  
  <pre><code>Name   id  Col1  Col2
  Row1   1    6     1
  Row2   2    2     3
  Row3   3    9     5
  Row4   4    16    8
  </code></pre>
  
  <p>I want to combine all the following Updates into one query</p>
  
  <pre><code>UPDATE table SET Col1 = 1 WHERE id = 1;
  UPDATE table SET Col1 = 2 WHERE id = 2;
  UPDATE table SET Col2 = 3 WHERE id = 3;
  UPDATE table SET Col1 = 10 WHERE id = 4;
  UPDATE table SET Col2 = 12 WHERE id = 4;
  </code></pre>