The SQL MAX function returns the largest value of the selected column.
Employees Table
employeeID | employeeName | age |
1000 | John Smith | 40 |
1001 | Fred White | 27 |
1002 | Jane Scott | 53 |
1003 | Samuel Williams | 31 |
In this example, we want to find the maximum age in the employees table.
Syntax
SELECT MAX(column_name)
FROM Table |
Example
SELECT MAX(age) as [Max Age]
FROM employees
|
Results
The SQL MAX function is used to find the largest value in a given column.
Please help us spread the word by socializing it today!
Did you find something wrong with the information on this page? Please take a moment to report it to us
so that we can continue to improve the quality of the information on this site. Click here to
report an issue with this page.
Recommended Books & Training Resources