SQL Server MIN() Function
Example
Find the price of the cheapest product in the "Products" table:
SELECT MIN(Price) AS
SmallestPrice FROM Products;
Try it Yourself »
Definition and Usage
The MIN() function returns the minimum value of an expression.
Note: See also the MAX() function.
Syntax
MIN(expression)
Parameter Values
Parameter | Description |
---|---|
expression | Required. A numeric value (can be a field or a formula) |
Technical Details
Works in: | SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, SQL Server 2005 |
---|