mssql与mysql差异之三:CASE多分支语句
mssql与mysql区别之三:CASE多分支语句
mssql:
select xx.id,评价=case when name='a' then '优秀' when name='b' then '良好' else '一般' end from xx
mysql:
select total,case when total>0 then '浪费' else '节约' end as '评价' from month