Find the price of the cheapest product in the "Products" table:
SELECT MIN(Price) AS SmallestPrice FROM Products;
Try it Yourself »
The MIN() function returns the minimum value in a set of values.
Note: Also look at the MAX() function.
MIN(
expression)
Parameter | Description |
---|---|
expression | Required. A numeric value (can be a field or a formula) |
Works in: | SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse |
---|
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!