IFNULL(count,0) as count

select IFNULL(count,0) as count from table_name

可以设置当某个字段为空的时候默认值。

 

相关文章: