title: Provide a list of data to "ON DUPLICATE KEY UPDATE"
body: <p>I have an array of data that I'd like to insert into a table.  The table has a unique key <code>code</code> and if a record already exists with that key I would like to update that record instead.  I thought that this might be achievable with the <code>INSERT INTO ON DUPLICATE KEY UPDATE</code> statement</p>
  
  <pre><code>INSERT INTO codes (code, delta) 
  VALUES ... 
  ON DUPLICATE KEY UPDATE
  delta=new_delta
  </code></pre>
  
  <p>The problem with the above syntax is that <code>new_delta</code> is an attribute different for each cell in the array.  Is it possible to provide a list of each <code>new_delta</code> in this syntax, and select the relevant <code>new_delta</code> for each <code>code</code>?  Or is there another way that this problem should be approached?</p>