Example
Find the price of the most expensive product in the "Products" table:
sql
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
text
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 |
|---|