title: SQL INSERT INTO from multiple tables
body: <p>this is my table 1:</p>
  
  <pre><code>NAME       AGE        SEX        CITY             ID
  
  Clara      22         f          New York         1
  Bob        33         m          Washington       2
  Sam        25         m          Boston           3
  </code></pre>
  
  <p>this is my table 2:</p>
  
  <pre><code>NUMBER       ID
  555-1111     1
  555-2222     2
  555-3333     3
  </code></pre>
  
  <p>and now I want a table 3 which shows me all information:</p>
  
  <pre><code>NAME       AGE        SEX        CITY             ID        NUMBER
  
  Clara      22         f          New York         1         555-1111
  Bob        33         m          Washington       2         555-2222
  Sam        25         m          Boston           3         555-3333
  </code></pre>
  
  <p>I tried first to insert into table 3 only the values from table 1 and then I inserted into table 3 the values from table 2 with an inner join where Id = Id is.</p>
  
  <pre><code>INSERT INTO table3 { name, age, sex, city, id}
  SELECT name, age, sex, city, id
  FROM table 1
  
  
  
  INSERT INTO table3 { name, age, sex, city, id, number}
  SELECT name, age, sex, city, id, number
  FROM table 2 p
  INNER JOIN table 3 c ON c.Id = p.Id
  </code></pre>
  
  <p>But all I get is a duplication of my values. instead of having 3 entries, I have like 9 entries, which some have number null, some have only the number and the rest null, and some are correct.</p>
  
  <p>I hope someone can help me</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>If I am having now a third Table like this one:</p>
  
  <pre><code>NATIONALITY       ID
  
  Canadian          1
  American          2
  French            3
  </code></pre>
  
  <p>How could I merge all 3 tables into one Table?</p>