Skip to content

MAX

  • expression: The input data, typically set of values or a column, from which the maximum value is to be calculated. It can come from a row or a field in a SQL table. The expression is mandatory and normally refers to a column of a table. The expression must be numeric or date/time based. The SQL MAX() function doesn’t take any string based comparison.
SELECT MAX(Salary)
FROM Employees;
+-------------+
| MAX(Salary) |
+-------------+
| 20000 |
+-------------+

The given SQL query selects the highest salary from the ‘Employees’ table. The output shows the highest salary, which is ‘20000’.