select isnull(max(字段),0) from [tables]这么写,这样为空的时候会给你一个0,你判断是不是为0就是了
MAX(category)查询为空时如何处理?
原文:https://www.cnblogs.com/wangchengb/p/10480424.html