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