H
hzjzxp
Unregistered / Unconfirmed
GUEST, unregistred user!
select (Case a when 'A' then 10 else 0 end),(Case a when 'B' then 20 else 0 end),(Case a when 'A' then 0 when 'B' then 0 else 30 end) from table_name<br>能不能把(Case a when 'A' then 0 when 'B' then 0 else 30 end)简化成用and的语句,如果前面条件多的话,会写很长,这样很不方便.<br>请大家帮忙