MIN

Returns the minimum value in the expression. May be followed by the OVER clause.

Syntax

MIN ( [ 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. MIN 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 MIN([DecimalValue]+[SmallIntValue]) AS [Min] FROM [BasicDataTable]

See Also