同一字段根据不同条件更新的sql语句怎么写

如题所述

没太明白你的需求


比如,这样?

update ta set col1 = (select case tb.a > 1000 then 1 else 0 end from tb where ta.id = tb.aid)
where ...
温馨提示:内容为网友见解,仅供参考
第1个回答  2016-11-23
update tablename set col=decode(.....)
相似回答