SQL Reduction Functions
Description
Reduction functions operate on zero or a list of expressions and return a single expression. If no expression is passed as a parameter, the result is NULL. All expressions must be converted to public data types.
- If all parameters are NULL, the result is NULL. Otherwise, NULL parameters are ignored.
- If all parameters contain both numbers and strings, they are interpreted as strings.
- If all parameters are integers, they are interpreted as long integers.
- If all parameters are numeric and at least one of them is double, all parameters are interpreted as double.
Syntax
GREATEST([expr1, ...])/ LEAST([expr1, ...])
Examples
GREATEST([expr1, ...])/LEAST([expr1, ...])
The GREATEST function returns the maximum value in zero or a list of expressions.
The LEAST function returns the minimum value in zero or a list of expressions.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.