title: SQL INSERT...SELECT with auto-increment DATETIME
body: <p>I have two tables with the following structure :</p>
  
  <pre><code>userid, entrydatetime, record.
  </code></pre>
  
  <p><code>tableA</code> - has primary key <code>(userid, entrydatetime)</code> </p>
  
  <p><code>tableB</code> - has no constraints set.</p>
  
  <p>I am trying to do an </p>
  
  <p><code>INSERT INTO tableA SELECT * FROM tableB</code> ,</p>
  
  <p>but I am getting an error because <code>tableB</code> has all the same <code>userid</code> and <code>entrydatetime</code>.</p>
  
  <p>e.g. userid = '12345' and entrydatetime = '0000-00-00 00:00:00'. </p>
  
  <p>the main data that I need from <code>tableB</code> are <code>userid</code> and record. <code>entryDateTime</code> is less critical to me for this scenario.</p>
  
  <p>How can I merge my two tables yet keeping my <code>tableA</code> primary key constraint? Is there a way I can randomize or autoincrement the <code>entrydatetime</code> field on insert?</p>