SoFunction
Updated on 2025-04-14

IBM DB2 daily maintenance summary (VII)

The db2 tutorial we are watching is: IBM DB2 daily maintenance summary (7). DB2 functions
()
Returns the average of a set of values.
SELECTAVG(SALARY)FROMBSEMPMS;

(),CORRELATION()
Returns the relationship coefficient of a pair of numeric values.
SELECTCORRELATION(SALARY,BONUS)FROMBSEMPMS;

()
Returns the number of rows or values.
SELECTCOUNT(*)FROMBSEMPMS;

(),COVARIANCE()
Returns the covariance of a pair of numeric values.
SELECTCOVAR(SALARY,BONUS)FROMBSEMPMS;

()
Returns the maximum value of a set of values.
SELECTMAX(SALARY)FROMBSEMPMS;

()
Returns the minimum value in a set of numeric values.
SELECTMIN(SALARY)FROMBSEMPMS;

()
Returns the standard deviation of a set of values.
SELECTSTDDEV(SALARY)FROMBSEMPMS;

()
Returns the sum of a set of data.
SELECTSUM(SALARY)FROMBSEMPMS;

(),VARIANCE()
Returns the variance of a set of values.
SELECTVARIANCE(SALARY)FROMBSEMPMS;

(),ABSVAL()
Returns the absolute value of the parameter.
SELECTABS(-3.4)FROMBSEMPMS;

()
Returns the inverse cosine value of the parameter.
SELECTACOS(0.9)FROMBSEMPMS;

()
Returns the ASCII code of the character to the leftmost of the integer parameter.
SELECTASCII('R')FROMBSEMPMS;

()
Returns the inverse sine function of the parameter of the angle represented in radians.
SELECTASIN(0.9)FROMBSEMPMS;

()
Returns the arctangent value of the parameter, the parameter of the angle represented by radians.
SELECTATAN(0.9)FROMBSEMPMS;

149.ATAN2()
Returns the arctangent value of the X and Y coordinates of the angle represented by radians.
SELECTATAN2(0.5,0.9)FROMBSEMPMS;

()
Returns a 64-bit integer representation of a number or string in an integer constant.
SELECTBIGINT(EMP_NO)FROMBSEMPMS;

()ORCEIL()
Returns the smallest integer value larger than the parameter or equal to the parameter.
SELECTCEILING(3.56)FROMBSEMPMS;
SELECTCEIL(4.67)FROMBSEMPMS;

()
Returns a string representation of date-time, string, integer, decimal or double-precision floating-point numbers.
SELECTCHAR(SALARY,',')FROMBSEMPMS;

()
Returns a character with the ASCII code specified by the parameter.
SELECTCHAR(167)FROMBSEMPMS;