select count(distinct(需要统计不重复的字段)) from 表
Oracle:select count(*) from (select distinct * from table);
select distinct 列名 from 表名
这样不行.应这样.select distinct count(*) from 表