title: Insert from another table and also insert new value
body: <p>I have two tables, one of them is 'user_flag' and the other is 'playlist_data'.</p>
  
  <p>I want to take all 'object_id' column entries of 'user_flag' and place them into the respective 'object_id' column of 'playlist_data', but only if those entries have '3' as the 'user' entry, and that they do not already exist (no duplicate 'object_id's!).</p>
  
  <p>I tried to learn how to do it and this is what I found:</p>
  
  <pre><code>INSERT INTO playlist_data (object_id)
  SELECT object_id FROM user_flag
  WHERE user='3';
  ON DUPLICATE KEY UPDATE object_id=object_id
  </code></pre>
  
  <p>Will this work properly?</p>
  
  <p>But I'm also trying to do more at the same time, and I can't seem to find an answer:</p>
  
  <p>1) I want to also insert new data with this. I want all of the newly inserted entries to also contain '5' in the 'filetype' column of 'playlist_data'.</p>
  
  <p>Do I just </p>
  
  <pre><code>INSERT INTO playlist_data (filtype)
  VALUES (5) 
  </code></pre>
  
  <p>in the middle of all of this?</p>
  
  <p>2) Both tables also have an 'id' column, will it automatically generate a new id followed from the latest 'id' of 'playlist_data'? </p>
  
  <p>As in for example, I'm transferring from 'user_flag' an entry with the 'id' of '150', while the highest 'id' in 'playlist_data' is '63', will the inserted one by '64', or do I need to define that somehow?</p>