select count(id) from student where ISNULL(pwd,'')=''
这样 无论pwd=''或者pwd为null都可以查到 
查询非空字段,只需:ISNULL(pwd,'')!=''

 

相关文章: