MIN (Transact-SQL)
Returns the minimum value in the expression. May be followed by the OVER clause.
Syntax
MIN ( [ ALL | DISTINCT ] expression )
Arguments
Return Types
Returns a value same as expression.
Remarks
MIN ignores any null values.
With character data columns, MIN finds the value that is lowest in the sort sequence.
Examples
The following example returns the lowest (minimum) tax rate.
USE AdventureWorks; GO SELECT MIN(TaxRate) FROM Sales.SalesTaxRate; GO
Here is the result set.
------------------- 5.00 (1 row(s) affected)
See Also
