The result of a column function is derived by the application of the column function to the specified argument.
The following rules apply to all column functions other than COUNT(*).
The following table lists each column function, the result of each, the data type of the result, and any exceptions.
Column Functions:
|
Column Function |
Description |
|---|---|
|
AVG
|
Results: The values must be numbers. If the values are binary integers, the fractional part of the average is lost. Data Type: Exception: If the data type of the argument is decimal with precision p and scale s, the precision of the result is 31 and the scale is 31 - p + s. The sum of the values of the argument must be within the range of the result data type. |
|
COUNT(*)
|
Results: Data Type: |
|
COUNT(DISTINCT column-name)
|
Results: Data Type: |
|
MAX
|
Results: The maximum value in its argument. Data Type: |
|
MIN
|
Results: The minimum value in its argument. Data Type: |
|
SUM
|
Results: Data Type: The values must be numbers. Exception: If the data type of the argument is decimal, the precision of the result is 31 and the scale is the same as the scale of the argument. The sum of the values must be within the range of the result data type. |
|
Copyright © 2014 CA.
All rights reserved.
|
|