Oracle® OLAP DML Reference 11g Release 2 (11.2) Part Number E17122-07 |
|
|
PDF · Mobi · ePub |
The LEAST function returns the smallest expression in a list of expressions. All expressions after the first are implicitly converted to the data type of the first expression before the comparison.
To retrieve the largest expression in a list of expressions, use GREATEST.
The data type of the first expression.
LEAST (expr [, expr]...)
An expression.
OLADM1745Example 8-7 Finding the Text Expression that is First Alphabetically
The following statement returns the string that is first in alphabetic sequence.
SHOW LEAST('Harry','Harriot','Harold') Harold
OLADM1746Example 8-8 Finding the Smallest Numerical Expressions
The following statement selects the number with the smallest value.
SHOW LEAST (5, 3, 18) 3