Oracle® Database SQL Language Reference 11g Release 1 (11.1) Part Number B28286-01 |
|
|
View PDF |
Syntax
Purpose
LEAST
returns the least of the list of expr
s. All expr
s after the first are implicitly converted to the datatype of the first expr
before the comparison. Oracle Database compares the expr
s using nonpadded comparison semantics. If the value returned by this function is character data, then its datatype is always VARCHAR2
.
See Also:
Table 2-10, "Implicit Type Conversion Matrix" for more information on implicit conversion, "Floating-Point Numbers" for information on binary-float comparison semantics, and "Datatype Comparison Rules"Examples
The following statement selects the string with the least value:
SELECT LEAST('HARRY','HARRIOT','HAROLD') "LEAST" FROM DUAL; LEAST ------ HAROLD