MySQL查询去重

方法一:

distinct

select count(distinct CName) from Course

 

方法二:

使用分组 group by

select count(1) from Course group by CName

 

posted @ 2018-08-31 09:31  梁颖666  阅读(344)  评论(0编辑  收藏  举报