Find the price of the most expensive product in the "Products" table:
SELECT MAX(Price) AS LargestPrice FROM Products;
Try it Yourself »
The MAX() function returns the maximum value in a set of values.
Note: See also the MIN() function.
MAX(
expression)
Parameter | Description |
---|---|
expression | Required. A numeric value (can be a field or a formula) |
Works in: | From MySQL 4.0 |
---|
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!