title: Mysql Clone Row With Primary Key
body: <p>I have a Mysql table with a single primary key (called pkey) that auto increments, and I would like to clone one row, keeping all the data the same, except for the primary key which should become the next available value as defined by auto increment.</p>
  
  <p>My first question is, is the following query possible?</p>
  
  <pre><code>UPDATE `table` SET pkey='next_available_primary_key' WHERE pkey='old_primary_key'
  </code></pre>
  
  <p>if have tried </p>
  
  <pre><code>UPDATE `table` SET pkey=null WHERE pkey='old_primary_key'
  </code></pre>
  
  <p>But it only sets the value of the primary key to zero. Thank in advance for any help/suggestions.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I guess i should add that i don't really want two copies of the data in the table. I just want to change the primary key. So if i were to use INSERT SELECT i would have to compensate using  ON DUPLICATE KEY UPDATE pkey='next_available_primary_key' i am just not sure how to do this...</p>