自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Mysql聚合函數(shù)簡介

數(shù)據(jù)庫 MySQL
和group by配合使用的Mysql聚合函數(shù)是最重要的Mysql函數(shù)之一,下面就對(duì)Mysql聚合函數(shù)進(jìn)行詳細(xì)的介紹,供您參考學(xué)習(xí)。

下面為您介紹的函數(shù)是和group by配合使用的Mysql聚合函數(shù),如果您對(duì)Mysql聚合函數(shù)方面感興趣的話,不妨一看,相信對(duì)您會(huì)有所幫助。

除非特殊說明,Mysql聚合函數(shù)均忽略 null 值的記錄。

除非特殊說明,Mysql聚合函數(shù)均在沒有匹配記錄(記錄集為空)的情況下均返回 null 值。

如果在沒有使用group by的語句中使用Mysql聚合函數(shù),相當(dāng)于對(duì)所有的行進(jìn)行分組。
 

 Aggregate (GROUP BY) Functions

Name Description
AVG() Return the average value of the argument
BIT_AND() Return bitwise and
BIT_OR() Return bitwise or
BIT_XOR()(v4.1.1) Return bitwise xor
COUNT(DISTINCT) Return the count of a number of different values
COUNT() Return a count of the number of rows returned
GROUP_CONCAT()(v4.1) Return a concatenated string
MAX() Return the maximum value
MIN() Return the minimum value
STDDEV_POP()(v5.0.3) STDDEV()  STD() Return the population standard deviation
STDDEV_SAMP()(v5.0.3) Return the sample standard deviation
SUM() Return the sum
VAR_POP()(v5.0.3) VARIANCE()(v4.1) Return the population standard variance
VAR_SAMP()(v5.0.3) Return the sample variance

 bit_and() 如果沒有行返回,則為 最大的unsigned bigint整數(shù):18446744073709551615

bit_or()、bit_xor() 如果沒有行返回,則為 0

count(*) 返回所有行的數(shù)據(jù),包括null,如果沒有行返回,則為 0

count(expr)返回所有非null的數(shù)據(jù),如果沒有行返回,則為 0

count(distinct expr)返回所有非null的不同數(shù)據(jù),如果沒有行返回,則為 0;和sql標(biāo)準(zhǔn)不兼容,標(biāo)準(zhǔn)sql返回所有不同的數(shù)據(jù)的行數(shù),包括null值。

 

 

【編輯推薦】

MySQL字符串大小寫轉(zhuǎn)換函數(shù)

MySQL concat函數(shù)的使用

MySql遠(yuǎn)程連接的實(shí)現(xiàn)方法

MySQL主鍵的設(shè)計(jì)原則

MySQL分區(qū)的功能和限制

責(zé)任編輯:段燃 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-10-14 14:01:35

MySQL CONVE

2010-09-10 14:05:12

SQL聚合函數(shù)

2010-10-14 16:59:28

MySQL查詢

2010-10-25 17:08:34

oracle聚合函數(shù)

2010-06-13 13:17:49

MySQL 列值

2010-11-26 09:20:32

MySQL字符串連接函

2010-05-14 18:16:44

MySQL統(tǒng)計(jì)函數(shù)

2009-11-11 13:51:23

VS DisplayI

2010-10-25 15:12:42

Oracle日期函數(shù)

2010-10-25 17:28:05

Oracle bita

2010-10-25 17:39:24

Oracle單行日期函

2011-04-12 13:27:09

Oracle日期函數(shù)

2010-07-12 11:06:37

SQL Server2

2010-02-01 10:04:25

Python模板函數(shù)

2010-10-25 14:47:49

Oracle系統(tǒng)變量函

2010-05-14 17:34:36

MySQL數(shù)據(jù)庫列值

2010-04-27 12:51:49

Oracle 函數(shù)de

2010-11-22 10:57:22

MySQL字段類型

2009-08-20 14:28:00

C#靜態(tài)構(gòu)造函數(shù)

2010-04-01 09:34:06

Oracle函數(shù)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)