标签:
举例说明
SELECT CASE a.AFTER_QUALITY WHEN ‘0‘ THEN ‘过免维期‘ WHEN ‘1‘ THEN ‘未过免维期‘ ELSE ‘错误数据‘ END AS AFTER_QUALITY FROM t_maintain_log a
数据库表内容: 运行结果:
MySQL case when条件分支判断
原文地址:http://blog.csdn.net/calmreason/article/details/45063333