title: MySQL on duplicate key update
body: <p>If I have query like this, how can I refer to values I have already given in update statement, so that I don't need to insert same data to query again? Example I would like to update col1 value with 'xxx', but now I need to enter 'xxx' again in duplicate statement. Is there anyway to refer those values in duplicate statement?</p>
  
  <pre><code>INSERT INTO TABLENAME(col1, col2) 
  VALUES (’xxx’, ‘yyy’) 
  ON DUPLICATE KEY UPDATE col1 = ‘zzz’
  </code></pre>