Provide the maximum value from the list of arguments.
SELECT GREATEST(3, 12, 34, 8, 25); |
The GREATEST() function yields the highest value from the list of arguments.
Note: Also refer to the LEAST() function.
GREATEST(arg1, arg2, arg3, …) |
Parameter |
Description |
arg1, arg2, arg3, … |
Necessary: Specify the list of arguments for evaluation. |
Works in: | From MySQL 4.0 |
Provide the maximum value from the list of arguments.
SELECT GREATEST(“w3Schools.com”, “microsoft.com”, “apple.com”); |