Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

MIN

Example

Retrieve the price of the lowest-priced product in the “Products” table.

SELECT MIN(Price) AS SmallestPrice FROM Products;

Definition and Usage

The MIN() function retrieves the smallest value from a set of values.

Note: Consider using the MAX() function for retrieving the largest value.

Syntax

MIN(expression)

Parameter Values

Parameter

Description

expression

Required: A numerical value, which may be represented by a field or a formula.

Technical Details

Works in:

SQL Server (beginning from 2008), Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse