title: How can I check for duplicates before inserting into a table when inserting by select
body: <p>How can I check for duplicates before inserting into a table when inserting by select:</p>
  
  <pre><code>insert into table1
  select col1, col2 
  from table2
  </code></pre>
  
  <p>I need to check if table1 already has a row with table1.col1.value = table2.col1.value, and if yes, then exclude that row from the insert.</p>