sql查询结果格式化
有时候 我们需要对查询结果进行比较
如果值是 A ,则 返回A
如果值是B,则返回BB
以下sql在mysql中测试通过
Java代码
select
id,
monitor_rule_name,
monitor_rule_condition,
CASE
when monitor_rule_condition='lt' then '<'
when monitor_rule_condition='gt' then '>'
when monitor_rule_condition='eq' then '>'
end
as newColumn
from monitor_config_rule_monitor
bitsCN.comCopyright © 2019- sbnn.cn 版权所有
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务