SQL查询数据库语句条件不满足没办法显示0,而是空值

2025-03-24 17:40:56
推荐回答(1个)
回答1:

mysql:

select ifnull(count(*),0)+0 as cc From dede_diyform3 where ifcheck=0

sqlserver:

select isnull(count(*),0)+0 as cc From dede_diyform3 where ifcheck=0

挑着用吧