The db2 tutorial I am reading is: 1000 common fool questions for DB2 (Five). When applying DB2, you may encounter some seemingly simple problems. Especially for novices, I will briefly summarize it here and post it to you. I hope it will be helpful to you. At the same time, you are welcome to discuss together, develop together and make progress together!
The following are mainly based on the characters. The following characters are lowercase.
This article is not necessary for DB2 experts.
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;
The following are mainly based on the characters. The following characters are lowercase.
This article is not necessary for DB2 experts.
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;