使用count()函数时需要注意 SELECT count(DISTINCT COALESCE(user_name, 'NULL')) AS num FROM t_user; 转载于:https://www.cnblogs.com/jianzhaojing/p/11077039.html