MIN in SQL SERVER

MIN is an aggregate function which is used to obtain the minimum value out of all the values in a particular column.
Syntax:

SELECT MIN (<Column Name>) from <Table Name>

Example:

We have a table with the following data in the table SALES.

ITEMPRICE
ABC99.05
ABC1110.99
ABC270.89
ABC3100.99
ABC455.89

In order find out the minimum price out of all the sales we should use MIN function.

QUERY:

SELECT MIN(PRICE) FROM SALES

Result Set:














Result set contains minimum value of all the values in PRICE column.

This entry was posted in , . Bookmark the permalink.

Leave a reply