Skip Headers

Oracle® Database SQL Reference
10g Release 1 (10.1)

Part Number B10759-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


Syntax

least::=
Description of least.gif follows
Description of the illustration least.gif


Purpose

LEAST returns the least of the list of exprs. All exprs after the first are implicitly converted to the datatype of the first expr before the comparison. Oracle Database compares the exprs using nonpadded comparison semantics. If the value returned by this function is character data, then its datatype is always VARCHAR2.


See Also:

Table 2-11, "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