Method 1:
distinct
select count(distinct CName) from Course
Method two:
Using grouping group by
select count(1) from Course group by CName
Tech Blog
Method 1:
distinct
select count(distinct CName) from Course
Method two:
Using grouping group by
select count(1) from Course group by CName