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 -- 去重查询表中数据
select DISTINCT(user_id) from user_info where children_merchant_id='kuaiditong';

2、group by

select count(1) from Course group by CName

文档:mysql去重查询表中数据.note
链接:http://note.youdao.com/noteshare?id=581440d92396bab4de6568d1a69baa58&sub=9B8DAB091CC5490BA5F8FA29557CCD67

最新文章

  1. 向linux内核中添加外部中断驱动模块
  2. reactjs入门到实战(五)---- props详解
  3. mysql连接查询经典小例题
  4. Codeforces 706 C. Hard problem (dp)
  5. Android的图片压缩并上传
  6. Oracle EBS Report 输出字符字段前部"0"被Excel自动去掉问题
  7. PHP+IIS7+PHPMangerForIIS搭建开发环境
  8. [Qt] IP地址输入框实现
  9. 新概念英语(1-19)Tired and thirsty
  10. 第三期分享:一款很好用的api文档生成器
  11. 过滤器(Filter)和拦截器(Interceptor)
  12. 栈(LIFO)
  13. 手眼标定eye-to-hand 示例:handeye_stationarycam_calibration
  14. byteBuffer的用法
  15. [No000010E]Git7/9-标签管理
  16. 开始创作自己的VR作品——VR故事叙述终极指南
  17. C++学习基础十五--sizeof的常见使用
  18. Java异常处理设计(一)
  19. git拉取远程分支
  20. html中去掉文本框(input type="text")的边框或只显示下边框

热门文章

  1. 子网掩码!如何划分子网掩码,计算IP地址
  2. Javascript实现10种排序算法
  3. luoguP4779 【模板】单源最短路径
  4. [JZOJ100026]【NOIP2017提高A组模拟7.7】图
  5. [BZOJ1965][AHOI2005] 洗牌 - 扩展欧几里得
  6. s32k144 bootloader
  7. ESP32 开发之旅② Arduino For ESP32说明
  8. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
  9. jQuery的原生替代
  10. p6spy打印SQL