SQL MAX Function - SQL Server MAX() Function
The SQL MAX() Function
- The MAX() function retrieves the highest value from a specified column, offering a straightforward way to find the maximum value.
Demo Database
- Here is a selection from the Products table used in the examples:
![table -Wikitechy](https://wikitechy.com/cdn/tutorials/sql/table-wikitechy.jpg)
Syntax
SELECT MAX(column_name) FROM table_name;
- The MAX() function retrieves the highest value from a chosen column, providing a straightforward way to find the maximum value.
Example
SELECT MAX(Mark) FROM tbl_Wikitechy;
Output
![sql-max-function](https://wikitechy.com/cdn/tutorials/sql/sql-max-function.jpg)