Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

GREATEST

Example

Provide the maximum value from the list of arguments.

SELECT GREATEST(3, 1234, 825); 

Definition and Usage

The GREATEST() function yields the highest value from the list of arguments.

Note: Also refer to the LEAST() function.

Syntax

GREATEST(arg1arg2arg3, …)

Parameter Values

Parameter

Description

arg1arg2arg3, …

Necessary: Specify the list of arguments for evaluation.

Technical Details

Works in: From MySQL 4.0

More Examples

Example

Provide the maximum value from the list of arguments.

SELECT GREATEST(“w3Schools.com”“microsoft.com”“apple.com”);