设为首页 加入收藏

TOP

sql查询结果格式化
2014-11-24 07:34:00 来源: 作者: 【 】 浏览:3
Tags:sql 查询 结果 格式
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
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇centos下MySQL 5.5.11 CMake安装.. 下一篇mysql in函数结果不同预期,异常n..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·一篇说人话的文章, (2025-12-27 07:50:09)
·Python Web框架哪家 (2025-12-27 07:50:06)
·基于Python的数据分 (2025-12-27 07:50:03)
·深入理解 Java 集合 (2025-12-27 07:22:48)
·Java集合框架全面解 (2025-12-27 07:22:45)