📅  最后修改于: 2022-03-11 14:59:38.377000             🧑  作者: Mango
merge into target using (select k, max(v) as v from src group by k) as b on target.k = b.k
when matched then update set target.v = b.v
when not matched then insert (k, v) values (b.k, b.v);