The db2 Tutorial we are reading is: DB2 common dummies 1000 question (5 ). When applying DB2, you may encounter some seemingly simple problems. For Beginners, I would like to briefly summarize them and publish them to you, hoping to help you, we also welcome everyone to discuss, develop together, and make progress together!
The characters below are mainly in lower case based on DB27.X.
This article does not need to be viewed by DB2 experts.
DB2 Functions
135. AVG ()
Returns the average value of a set of values.
SELECTAVG (SALARY) FROMBSEMPMS;
136. CORR (), CORRELATION ()
Returns the relational coefficient of a number.
SELECTCORRELATION (SALARY, BONUS) FROMBSEMPMS;
137. COUNT ()
Returns the number of rows or values.
SELECTCOUNT (*) FROMBSEMPMS;
138. COVAR (), COVARIANCE ()
Returns the covariance of a value.
SELECTCOVAR (SALARY, BONUS) FROMBSEMPMS;
139. MAX ()
Returns the maximum value of a group of values.
SELECTMAX (SALARY) FROMBSEMPMS;
140. MIN ()
Returns the minimum value of a set of values.
SELECTMIN (SALARY) FROMBSEMPMS;
141. STDDEV ()
Returns the standard deviation of a set of values.
SELECTSTDDEV (SALARY) FROMBSEMPMS;
142. SUM ()
Returns the sum.
SELECTSUM (SALARY) FROMBSEMPMS;
143. VAR (), VARIANCE ()
Returns the variance of a set of values.
SELECTVARIANCE (SALARY) FROMBSEMPMS;
144. ABS (), ABSVAL ()
Returns the absolute value of a parameter.
SELECTABS (-3.4) FROMBSEMPMS;
145. ACOS ()
Returns the arc cosine of a parameter.
SELECTACOS (0.9) FROMBSEMPMS;
146. ASCII ()
Returns the ASCII code of the leftmost character of the integer parameter.
SELECTASCII ('R') FROMBSEMPMS;
147. ASIN ()
Returns the arcsin function of the Angle Parameter in radians.
SELECTASIN (0.9) FROMBSEMPMS;
148. ATAN ()
Returns the arc tangent of a parameter, which is an Angle Parameter in radians.
SELECTATAN (0.9) FROMBSEMPMS;
<