zmień kontrast font size: A A A
rss polski
you are at Encyclopedia of SQL >> MAX

MAX(`column_name`)

MAX returns the biggest value of specified column. For column with text values there will be used ASCII code for comparison.

Syntax


SELECT MAX(`column_name`)
FROM `table_name`

Example

Display age of the oldest person

namesurnameage
PawełKowalski3
PiotrJanik7
MichałNowak13

query


SELECT  MAX(`age`)
FROM `people`

result

MAX(`age`)
13

[ wróć na górę strony ]