mysql ifnull判断为空设置默认值

IFNULL(count,0) as count

select IFNULL(count,0) as count from table_name

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

猜你喜欢

转载自www.cnblogs.com/chenmz1995/p/10229023.html