I know how to make an insert of a row of values into a table using insert into. However, I cannot find an appropriate idiom for accomplishing the task that I have.
I have two tables. One table is the primary table and the other is an additional table. I need to insert rows that do not exist in the primary from additional table ignoring any duplicates.
I am trying to use some variations of:
replace into primary
select * from additional;
But this obviously replaces the rows which is not what I want. Should I use on duplicate
somehow or am I in a completely wrong direction?
EDIT:
Both of the columns have a unique surrogate key column which is just an integer value.