title: Bulk insert and update in mysql
body: <p>I am trying to make some bulk insert in my table but it should cater for duplicate values. If there are duplicate then it should update the rows instead of updating it. </p>
  
  <p>My table is: user(id, name, url) where id is PK</p>
  
  <p>I tried this:</p>
  
  <pre><code>INSERT INTO `user` (`id`, `name`, `url`) 
      VALUES 
      ('7656', 'Tom', 'http://user.com/7656'),
      ('1234', 'Jean', 'http://user.com/1234'), 
      ('8596', 'Pierre', 'http://user.com/8596'),         
      ('2035', 'Somon', 'http://user.com/2035'), 
      ('3685', 'Lola', 'http://user.com/3685')
      ON DUPLICATE KEY UPDATE name=VALUES(name), url=VALUES(url)
  </code></pre>
  
  <p>Assume that all the 5 record that i am trying to insert already exist in my table with just the url to update, how should i do it?</p>
  
  <p>Is it possible to update rows with bulk insert like this?</p>