方法一:
distinct
select count(distinct CName) from Course
方法二:
使用分组 group by
select count(1) from Course group by CName
MySQL查询去重
原文:https://www.cnblogs.com/LYliangying/p/9563966.html