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

 

posted @ 2017-10-21 10:27  EasonJim  阅读(8443)  评论(0编辑  收藏  举报