title: Is it possible to update only a single field with ON DUPLICATE KEY UPDATE in a table with multiple fields?
body: <p>Is it possible to update only a single field with ON DUPLICATE KEY UPDATE in a table with multiple fields?</p>
  
  <p>If I have a table with three fields; key, cats, dogs where key is the primary key is it possible to update a record on duplicate key, changing only one field, (for my example <code>cats</code>) without changing the value in the other non-key fields (<code>dogs</code>). This is without knowing what the value of <code>dogs</code> from outside of the database at the time of insertion (i.e. I have a variable holding cats value, but not one holding dogs value)</p>
  
  <pre><code>INSERT INTO `myTable` (`key`,`cats`) VALUES('someKey1','Manx') ON DUPLICATE KEY UPDATE `cats` = 'Manx';
  </code></pre>
  
  <p>At the moment when I run something like this and the key already exists in the table <code>dogs</code> is set to NULL even when it had a value previously.</p>