Home  >  Article  >  Database  >  MySQL中的聚合函数_MySQL

MySQL中的聚合函数_MySQL

WBOY
WBOYOriginal
2016-06-01 13:18:391420browse

bitsCN.com

1、count()返回某列的行数

2、avg()返回某列的平均值

3、max()返回某列的最大值

4、min()返回某列的最小值

5、sum()返回某列的和

6、distinct 去除重复值

avg()忽略值为null的行

count(*)时统计所有行,count(列)时忽略为null的行

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn