1-- Oracle: Example for Insert or update in t1 from t2 values
2MERGE INTO table1 t1
3USING table2 t2
4ON (t1.CODE = t2.ID)
5WHEN MATCHED THEN
6 UPDATE SET t1.COL1 = t2.VALUE1
7WHEN NOT MATCHED THEN
8 INSERT (CODE, COL1) VALUES (t2.ID, t2.VALUE1);