MySQL查询去重语句

1、distinct

select count(distinct CName) from Course
select count(CName) from (select distinct CName from Course) as temp

2、group by

select count(1) from Course group by CName
原文地址:https://www.cnblogs.com/EasonJim/p/7703923.html