title: sql insert if exists delete if not exists between 2 tables
body: <p>Looking for an SQL Query to do the following:</p>
  
  <ol>
  <li>insert all values of column <code>x</code> of <code>table1</code> to column <code>y</code> of <code>table2</code> if
  they don't exist in table2</li>
  <li>delete records from column <code>table2</code> if the value of clumn <code>y</code> doesn't exist anymore in
  column <code>x</code> of <code>table1</code></li>
  </ol>
  
  <p>I tried insert or ignore for the insert query with no luck in sql server 2008 R2</p>