bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL Server MIN() Function

Concept visual

SQL Server MIN() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Find the price of the cheapest product in the "Products" table:

SELECT MIN(Price) AS

SmallestPrice FROM Products;

Definition and Usage

The MIN() function returns the minimum value in a set of values.

Note:

Also look at 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 (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse

Previous

❮ SQL Server Functions

Next

Previous

SQL Server MAX() Function

Next

SQL Server PI() Function