Oracle9i SQL Reference Release 1 (9.0.1) Part Number A90125-01 |
|
Functions, 47 of 166
greatest::=
greatest
GREATEST
returns the greatest of the list of exprs. All exprs after the first are implicitly converted to the datatype of the first expr before the comparison. Oracle compares the exprs using nonpadded comparison semantics. Character comparison is based on the value of the character in the database character set. One character is greater than another if it has a higher character set value. If the value returned by this function is character data, its datatype is always VARCHAR2
.
The following statement selects the string with the greatest value:
SELECT GREATEST ('HARRY', 'HARRIOT', 'HAROLD') "Greatest" FROM DUAL; Greatest -------- HARRY
|
![]() Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|