title: MySQL Select all differences between 2 tables?
body: <p>I have 3 tables, 'old', 'new' and a 'result' table (from a phonebook database), they have the same structure and nearly the same entries.</p>
  
  <pre><code>old:
  ID  | name               | number | email | ...
  ----+--------------------+--------+-------+-----
  1   | foo                | 123    | ...
  2   | bar                | 456    |
  3   | entrry with typo   | 012345 |
  4   | John Doe           | 123345 |
  
  new:
  ID  | name               | number | email | ...
  ----+--------------------+--------+-------+-----
  1   | foo                | 123    | ...
  2   | bar                | 456    |
  3   | entry without typo | 012345 |
  4   | John Doe           | 12345  |
  5   | newly added entry  | 09876  |
  </code></pre>
  
  <p>From this 'new' table I would like to select all rows that are different from the 'old' table, so the result would be:</p>
  
  <pre><code>result:
  ID  | name               | number | email | ...
  ----+--------------------+--------+-------+-----
  3   | entry without typo | 012345 | ...
  4   | John Doe           | 12345  |
  5   | newly added entry  | 09876  |
  </code></pre>
  
  <p>including all entries that have changed data plus all entries that don't appear in 'old' table...</p>
  
  <p>Not only to make it more complicated, there are about 10 columns in those tables (including ID, name, number, email and several flags and other info).</p>
  
  <p>Is there any most performant solution for doing this or will I have to compare each column with a new query..?</p>