MySQL查询去重

方法一:

distinct

select count(distinct CName) from Course

方法二:

使用分组 group by

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