SQL MAX() Function

The MAX() Function

The MAX() function returns the largest value of the selected column.

SQL MAX() Syntax

SELECT MAX(column_name) FROM table_name;

SQL MAX() Example

The following SQL statement gets the largest value of the “Price” column from the “Products” table:

Example

SELECT MAX(Price) AS HighestPrice FROM Products;