The SQL MAX aggregate function is used to determine the largest values respectively in a column..

The SQL MAX syntax is looks like this:

SELECT MAX ( [COLUMN NAME] ) FROM [TABLE NAME]


EXAMPLE :

We can see with a simple example which is return largest value of the scores in the table.

Table GameScores

PlayerNameDepartmentScores
JasonIT3000
IreneIT1500
JaneMarketing1000
DavidMarketing2500
PaulHR2000
JamesHR2000

SQL statement :

SELECT MAX(Scores) FROM GameScores

Result:

MAX(Scores)
3000