oracle merge 语句,无数据新增,有数据更新



merge into e_audit_course_price t1
                using (select :contentId as contentid from dual) t2
                on (t1.contentid = t2.contentid)
                when matched then
                  update set t1.onlinenum = t1.onlinenum + 1
                when not matched then
                  insert ( t1.ID,t1.CONTENTID,t1.CHARGEMODE,t1.INFOFEE,t1.INFOFEECHAPTERID,
                              t1.REJECTREASON,t1.AUDITSTATUS,t1.APPLYTIME) 
                  values (:contentId, 1, :type)


阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/luoyejie/article/details/51564275
上一篇将json字符串转化为java对象
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭