title: MySQL insert row on duplicate key update multiple columns
body: <p>I have a table <code>(name, date, stat1, stat2, stat3)</code>, <code>(name, date)</code> is the PK. When I insert rows, there will be duplicate keys, and I need to sum up the three stats. I use the following query with PreparedStatement in Java:</p>
  
  <pre><code>INSERT INTO tb (name, date, stat1, stat2, stat3)
  VALUES (?, ?, ?, ?, ?)
  ON DUPLICATE KEY UPDATE stat1 = stat1 + ?, stat2 = stat2 + ?, stat3 = stat3 + ?
  </code></pre>
  
  <p>Is there a more concise query to achieve that? Because I have simplify the query, there are over ten stats there.</p>