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/p/2491565.html