MAX#

Returns the maximum value in the expression.

Syntax#

MAX ( [ ALL | DISTINCT ] expression )
    OVER ( [ partition_by_clause ] order_by_clause )

Arguments#

expression

Is a constant, column name, or function, and any combination of arithmetic, bitwise, and string operators. MAX can be used with numeric, character, uniqueidentifier, and datetime columns, but not with bit columns. Aggregate functions and subqueries are not permitted.

Return types#

Returns a value same as expression.

Example#

SELECT MAX([FloatValue]) AS [Max]
  FROM [BasicDataTable]

See Also#