Skip Headers
Oracle® OLAP DML Reference
10g Release 2 (10.2)

Part Number B14346-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

LEAST

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.

Return Value

The data type of the first expression.

Syntax

LEAST (expr [, expr]...)

Arguments

expr

An expression.

Examples

Example 15-38 Finding the Shortest Text Expressions

The following statement returns the shortest string.

SHOW LEAST('Harry','Harriot','Harold')
Harry 

Example 15-39 Finding the Smallest Numerical Expressions

The following statement selects the number with the smallest value.

SHOW LEAST (5, 3, 18)
3