mysql if判断字段值更新量两表数据sql

mysql if判断字段值更新量两表数据sql

UPDATE a,b

SET ps=if(ps=’0′,’1′,ps),uptime=if(ps=’0′,acttime,uptime),pw=if(ps=’0′,’123′,pw)

where eo_on in(select id from b where status =’1′) and a.on=b.id

原文链接:https://www.cnblogs.com/feathers/archive/2012/05/09/2491565.html
本文来源 互联网收集,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源,如您发现有涉嫌抄袭侵权的内容,请联系本站核实处理。

© 版权声明

相关文章