title: How to insert data from one table to another with conditions
body: <p>I am trying to insert new rows into <code>table a</code> and <em>partially</em> load the rows with data from <code>table b</code>. I would only like to insert new rows where the field <code>b.id</code> is not present in the <code>a.id</code> column.</p>
  
  <p><strong>Here are my tables:</strong></p>
  
  <pre><code>table_a       table_b
  ---------     -----------
  id             id
  first_name     first_name
  country        middle_name
  last_name      last_name
  </code></pre>
  
  <p><strong>Here is my code:</strong></p>
  
  <pre><code>INSERT INTO table_a a
  SELECT b.id, b.first_name,b. last_name
  FROM table_b b WHERE b.id &lt;&gt; a.id
  </code></pre>
  
  <p><strong>The Question:</strong> How can I do this using an insert select statement? Please note, I've included middle name in one table and Country in another table to make this more comparable to my current situation. Is there a way to "map" the fields? or must I ensure that my insert select statement has the exact same number of values to insert as the target table? Or will it just look for matching column names and only update those columns that match?</p>