当count(字段)为空时如何用0代替?

当count(字段)为空时怎么用0代替????selectcasewhen fild1 then count(fild)end 第一个 ,casewhen fild

当count(字段)为空时怎么用0代替????
select
case
when fild='1' then count(fild)
end 第一个 ,
case
when fild='2' then count(fild)
end 第二个,
case
when fild='3' then count(fild)
end 第三个,
c.name
from a group by name

[解决办法]
select
case
when fild='1' then count(fild) else 0
end 第一个 ,
case
when fild='2' then count(fild) else 0

end 第二个,
case
when fild='3' then count(fild) else 0

end 第三个,
c.name
from a group by name
[解决办法]
我的回复怎么不见了。。。