去重查询表mysql 中数据

1、distinct

select count(distinct CName) from teble
select count(CName) from (select distinct CName from Course) as temp
SELECT  DISTINCT text_zhcn FROM dms_menuconfig -- 去重查询表中数据

2、group by

select count(1) from Course group by CName
posted @ 2019-05-07 13:18  记忆中的梦境  阅读(1952)  评论(0编辑  收藏  举报