select case
when (a.priceType=1) then a.price
when (a.priceType=2) then a.feePrice/10
when (a.priceType=3) then a.price
else 0 end as jige from rsc_info a
注意,不要少了 end 结束符。
select case
when (a.priceType=1) then a.price
when (a.priceType=2) then a.feePrice/10
when (a.priceType=3) then a.price
else 0 end as jige from rsc_info a
注意,不要少了 end 结束符。