Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

Can anyone explain how to get max value in SQL?

1 Answer

0 votes
by (119k points)

The aggregate function MAX () is used to find the maximum value of the selected column in SQL. The following is the syntax to find max value in the selected column:

SELECT MAX(ColumnName)
FROM TableName
WHERE condition;

The following statement returns the top salary of the employee table:

SELECT MAX(Salary) as Maximum_Salary

FROM Employee

If you want to learn MAX () and other aggregate functions with complex queries, you can check out this SQL tutorial.

Related questions

Browse Categories

...