1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > Oracle merge into 使用记录

Oracle merge into 使用记录

时间:2020-11-23 18:54:56

相关推荐

Oracle merge into 使用记录

符合条件进行更新操作,不符合则进行插入操作.

merge into myd_nsrdt nusing (select '9'as mydtmid,'1'as tmtype,'370200123456788'as nsrsbh,'' as nsrmc,'sn' as region,4 as pf,''as yj,'18888888888' as phone,'18888888888' as nowphone,sysdate as addtime from dual) mon(n.mydtmid=m.mydtmid and n.nsrsbh=m.nsrsbh)when matched thenupdate set n.pf=m.pf,n.yj=m.yjwhere n.mydtmid=m.mydtmid and n.nsrsbh=m.nsrsbhwhen not matched theninsert values(seq_myd.nextval,m.mydtmid,m.tmtype,m.nsrsbh,m.nsrmc,m.region,m.pf,m.yj,m.phone,m.nowphone,m.addtime)

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。