bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL MAX() Function

Concept visual

MySQL MAX() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Find the price of the most expensive product in the "Products" table:

SELECT MAX(Price) AS LargestPrice FROM Products;

Definition and Usage

The MAX() function returns the maximum value in a set of values.

Note:

See also the MIN() function.

Syntax

Max(

expression )

Parameter Values

Parameter

Description expression

Required. A numeric value (can be a field or a formula)

Technical Details

Works in:

From MySQL 4.0

Previous

❮ MySQL Functions

Next

Previous

MySQL LOG2() Function

Next

MySQL MIN() Function