In this chapter you will learn:
About function Max ()
Syntax of function Max ()
Example of function Max ()
About function Max ()
SQL max () function used to returns the largest or highest value in the expression. If you have the records in a database and you want to retrieve or display the maximum value then you can use this function.
Syntax of function Max ()
SELECT max (column_name) from table_name
Example of function Max ()
select 'Maximum Rate' = max(Rate)from humanresources.employeepayhistory
SUMMARY
In this chapter, you have learned about function max () which is an aggregate function and used to retrieve largest or maximum value. In the next chapter you will learn about function sum().