merge我理解的意思就是根据on的判断来执行Insert还是update
merge into mytable as my ----mytable主表
using cy_contract as cy ---cy_contract 引用的表
on my.id = cy.ctid ----两张表的关系或者条件
when matched then ----如果满足
update set name = cy.ctname ----- 执行update
when not matched then ---否则
insert (name) values (cy.ctname); ------执行insert