22智能在线
新记
同一字段根据不同条件更新的sql语句怎么写
如题所述
举报该文章
相关建议 2016-11-23
没太æç½ä½ çéæ±
æ¯å¦ï¼è¿æ ·ï¼
update ta set col1 = (select case tb.a > 1000 then 1 else 0 end from tb where ta.id = tb.aid)
where ...
温馨提示:内容为网友见解,仅供参考
当前网址:
https://22.t2y.org/zz/cttfcic60f2sfshcif6.html
其他看法
第1个回答 2016-11-23
update tablename set col=decode(.....)
相似回答
大家正在搜
相关问题
如何用case/when语句实现不同条件下更新同一张数据表的...
sql语句更新数据库中一个表中同一字段(根据其他字段)赋予不...
sql中的update如何根据不同条件修改多条数据的同一列
一条sql update如何同时更新两个字段的值按不同条件
在SQL中表中数据同一列数据根据不同条件数据显示成两列,SQ...
SQL 用update语句一次更新多个字段应该怎么写
一条数据指定字段更新 sql语句怎么写?
怎样写sql语句 同一表根据某字段相同就更新