merge into my_table mt
using (SELECT [字段A] AS A from dual) t2
on (mt.A = t2.A)
when matched then
update set mt.B= [字段B]
when not matched then
INSERT (A,B)
VALUES([字段A],[字段B])
多用于存储过程
原文链接:https://www.f2er.com/oracle/212693.html