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
insert into table1 select col1, col2 from table2 where table2.col1 not in (select col1 from table1)