DB2函數
135.AVG()
返回一組數值的平均值.
SELECTAVG(SALARY)FROMBSEMPMS;
136.CORR(),CORRELATION()
返回一對數值的關系系數.
SELECTCORRELATION(SALARY,BONUS)FROMBSEMPMS;
137.COUNT()
返回一組行或值的個數.
SELECTCOUNT(*)FROMBSEMPMS;
138.COVAR(),COVARIANCE()
返回一對數值的協方差.
SELECTCOVAR(SALARY,BONUS)FROMBSEMPMS;
139.MAX()
返回一組數值中的最大值.
SELECTMAX(SALARY)FROMBSEMPMS;
140.MIN()
返回一組數值中的最小值.
SELECTMIN(SALARY)FROMBSEMPMS;
141.STDDEV()
返回一組數值的標准偏差.
SELECTSTDDEV(SALARY)FROMBSEMPMS;
142.SUM()
返回一組數據的和.
SELECTSUM(SALARY)FROMBSEMPMS;
143.VAR(),VARIANCE()
返回一組數值的方差.
SELECTVARIANCE(SALARY)FROMBSEMPMS;
144.ABS(),ABSVAL()
返回參數的絕對值.
SELECTABS(-3.4)FROMBSEMPMS;
145.ACOS()
返回參數的反余弦值.
SELECTACOS(0.9)FROMBSEMPMS;
146.ASCII()
返回整數參數最左邊的字符的ASCII碼.
SELECTASCII('R')FROMBSEMPMS;
147.ASIN()
返回用弧度表示的角度的參數的反正弦函數.
SELECTASIN(0.9)FROMBSEMPMS;
148.ATAN()
返回參數的反正切值,該參數用弧度表示的角度的參數.
SELECTATAN(0.9)FROMBSEMPMS;
149.ATAN2()
返回用弧度表示的角度的X和Y坐標的反正切值.
SELECTATAN2(0.5,0.9)FROMBSEMPMS;
150.BIGINT()
返回整型常量中的數字或字符串的64位整數表示.
SELECTBIGINT(EMP_NO)FROMBSEMPMS;
151.CEILING()ORCEIL()
返回比參數大或等於參數的最小的整數值.
SELECTCEILING(3.56)FROMBSEMPMS;
SELECTCEIL(4.67)FROMBSEMPMS;
152.CHAR()
返回日期時間型,字符串,整數,十進制或雙精度浮點數的字符串表示.
SELECTCHAR(SALARY,',')FROMBSEMPMS;
153.CHR()
返回具有由參數指定的ASCII碼的字符.
SELECTCHAR(167)FROMBSEMPMS;