好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Oracle merge into 使用记录

myd_nsrdt n using ( 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) m on (n.mydtmid = m.mydtmid and n.nsrsbh = m.nsrsbh) when matched then update set n.pf = m.pf,n.yj = m.yj where n.mydtmid = m.mydtmid and n.nsrsbh = m.nsrsbh when not matched then insert values (seq_myd.nextval,m.mydtmid,m.tmtype,m.nsrsbh,m.nsrmc,m.region,m.pf,m.yj,m.phone,m.nowphone,m.addtime)

 

Oracle merge into 使用记录

标签:

查看更多关于Oracle merge into 使用记录的详细内容...

  阅读:28次