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 distinct col1, col2 from table2