title: combining data from two tables with same primary key
body: <p>I have a table like this:</p>
  <pre><code>table1
  id   | name  | location
  ------------------------
  1    | brian | null
  2    | john  | null
  </code></pre>
  <p>and another table like this:</p>
  <pre><code>table2
  id   | location
  ------------------------
  2    |  USA
  1    |  China
  </code></pre>
  <p>I want to INSERT the locations into the table1 ON t1.id=t2.id so table1 looks like this:</p>
  <pre><code>table1
  id   | name  | location
  ------------------------
  1    | brian | China
  2    | john  | USA
  </code></pre>
  <p>For some reason though, when I run</p>
  <pre><code>INSERT INTO table1
  SELECT location FROM table2
  WHERE table1.id = table2.id;
  </code></pre>
  <p>I get a syntax error. Does anyone know how to insert it correctly?</p>