4. Understanding the Elements of SQL Statements : Expressions in SQL : CASE Expressions : GREATEST, GREATER, LEAST, LESSER Functions
 
Share this page                  
GREATEST, GREATER, LEAST, LESSER Functions
GREATEST
GREATEST(v1,v2...vN)
Operand type: Any
Result type: Any
Returns greatest of values in v1 through vN. Return type is based on that of the first parameter with a size or precision suitable to represent each of the parameters. If all of the values v1 through vN are NULL then returns NULL.
GREATER
GREATER(v1,v2…vN)
Operand type: Any
Result type: Any
Returns greatest of values in v1 through vN. Return type is based on that of the first parameter with a size or precision suitable to represent each of the parameters. If any of the values v1 through vN are NULL then returns NULL.
LEAST
LEAST(v1,v2...vN)
Operand type: Any
Result type: Any
Returns least of values v1 through vN. Return type is based on that of the first parameter with a size or precision suitable to represent each of the parameters. If all of the values v1 through vN are NULL then returns NULL.
LESSER
LESSER(v1,v2...vN)
Operand type: Any
Result type: Any
Returns least of values v1 through vN. Return type is based on that of the first parameter with a size or precision suitable to represent each of the parameters. If any of the values v1 through vN are NULL then returns NULL.