我有一个简单的查询,但只有一部分让我感到困惑:
我有以下算法:
merge into table_1 table_2
on table_1.val1 = table_2.val1
when matched and table_1.val2 = table_2.val2
then merge
when matched and table_1.val2 != table_2.val2
then delete and insert ( I AM NOT SURE NOW TO DO THIS)
when not matched
then insert;
你能帮我删除和插入或告诉我一个方法吗?