Mysql条件判断语法

select orderid AS 订单编号, case type when 11 then '退货' when 12 then '换货' else '非退换货' end as 类型,finalAmount AS 金额 from table 注意:else   end 不能少,不然语法错误,与sqlserver不一样。 sql
相关文章
相关标签/搜索