求一句判断的SQL语句 编号 原始 现在 已修时间 状态1 坏 好 2013-9-5 C2 坏 坏 NULL D如何更新【状态】这个字段规则: 原始是坏,现在是好, 状态应该是C 原始是坏,现在还是坏,状态应该是D 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 UPDATE SET STATUS=CASE WHEN 原始='坏' and 现在='好' then 'C' WHEN 原始='坏' and 现在='坏' then 'D' END update [表名] set 状态=case when 原始='坏' and 现在='好' then 'C' when 原始='坏' and 现在='坏' then 'D' end 用两条更新语句来做速度比较快update [表名] set [状态]='C'where [原始]='坏' and [现在]='好' update [表名] set [状态]='D'where [原始]='坏' and [现在]='坏' update tk set status=(case when 原始='坏' and 现在='好' then 'C' when 原始='坏' and 现在='坏' then 'D' end) 求一SQL语句 插入数据 关于取数据自动增加的列 SQL Server单元测试方法的尝试 FETCH API_CURSOR00000000000000E2 这个是啥错误? 请大家帮我看夏写的SQL大概对不对 如何update使float型的字段为<null> 而不是0 数据库日志满,能否设置自动清除日志 这个SQL语句如何写?求教! 为什么生成的备份文件没有“.bak”后缀??? 求助:相同属性归类问题 建表设置外键出错,求解
WHEN 原始='坏' and 现在='坏' then 'D'
END
update [表名]
set 状态=case when 原始='坏' and 现在='好' then 'C'
when 原始='坏' and 现在='坏' then 'D' end
where [原始]='坏' and [现在]='好' update [表名] set [状态]='D'
where [原始]='坏' and [现在]='坏'
update tk set status=
(case when 原始='坏' and 现在='好' then 'C' when 原始='坏' and 现在='坏' then 'D' end)