select count(*)from (select 字段from 表group by 字段having count(字段)<=1order by 字段) 结果应该和select count(1) from(select distinct 字段 from 表)一样这种方法才是对的