title: MySQL insert into table with auto-increment while selecting from another table
body: <p>I have a table with an auto-increment primary key:</p>
  
  <pre><code>create table rt_table
  (
    rtID int PRIMARY KEY AUTO_INCREMENT, 
    rt_user_id BIGINT,               /*user being retweeted*/
    rt_user_name varchar(70),        /*user name of rt_user_id*/
    source_user_id BIGINT,           /*user tweeting rt_user_id*/
    source_user_name varchar(70),    /*user name of source_user_id*/
    tweet_id BIGINT,                 /*fk to table tweets*/
  
    FOREIGN KEY (tweet_id) references tweets(tweet_id)
  );
  </code></pre>
  
  <p>I wish to populate this table from parts of another table:</p>
  
  <pre><code>insert into rt_table 
  select rt_user_id, (select user_name from users u where u.user_id = t.rt_user_id),
         source_user_id, (select user_name from users u where u.user_id = t.source_user_id),
         tweet_id
    from tweets t
   where rt_user_id != -1;
  </code></pre>
  
  <p>I get an error which says the number of columns do not match up, which is because of the primary key (which is an auto-incremented value and thus does not need to be set). How do I get around this?</p>