首页 > 代码库 > MySQL多表更新
MySQL多表更新
update payb a inner join payb_item b on a.paybno=b.paybno inner join loan_vilt c on b.loano=c.loano inner join loan d on b.loano=d.loano inner join loan_repay e on e.loano=d.loano and e.idx=c.idx set a.state=#{newst},a.vn=a.vn+1,a.uptime=now(), c.state=#{loan_vilt_newst},c.vn=c.vn+1,c.uptime=now(), d.state=#{loan_newst},d.vn=d.vn+1,d.uptime=now(), e.state=#{loan_repay_newst},e.vn=e.vn+1,e.uptime=now() where a.paybno=#{paybno} and a.state=#{oldst} and a.vn=#{curvn} and c.state=#{loan_vilt_oldst} and d.state in (#{loan_oldst_ins}) and e.state=#{loan_repay_oldst};
本文出自 “熔 岩” 博客,请务必保留此出处http://lavasoft.blog.51cto.com/62575/1876668
MySQL多表更新
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。