MySQL 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: | MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23 |
---|