How can I check for duplicates before inserting into a table when inserting by select:
insert into table1
select col1, col2
from table2
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.