要怎么统计出不重复的条数?select count(distinct *) from 表

2025-02-25 20:43:39
推荐回答(4个)
回答1:

select count(distinct(需要统计不重复的字段)) from 表

回答2:

Oracle:

select count(*) from (select distinct * from table);

回答3:

select distinct 列名 from 表名

回答4:

这样不行.
应这样.select distinct count(*) from 表