I have two tables:
table1
: (ID, Code, Name)
table2
: (ID, Code, Name)
with same columns
I want to to insert data from table1 to table2 or update columns if that exists in table2 (table1.ID = table2.ID)
What is the simple way to do this?
WITH OUT MERGE
table2
intotable1
, 2) update rows that don't match. As a side note, is there any particular reason you need two identical tables?