HOW TO USE MIN() AND MAX() FUNTION IN SQL?

304 viewsSQLSQL
0
MIN and MAX in SQL
MIN and MAX in SQL
MIN()ย ANDย MAX()

MIN()ย function returns the smallest value of the selected column

Syntax โ€“

SELECTย  MIN(ColumnName)

FROMย <TableName>

WHERE<condition> ;

Example-

SELECTย  MIN(Price)

FROMย Products;

MAX()ย function returns the largest value of the selected column

Syntax โ€“

SELECTย  MAX(ColumnName)

FROMย <TableName>

WHERE<condition> ;

Example-

SELECTย  MAX(Price)

FROMย Products;

Note-

Northwind database is used for examples.

Saraswat World Changed status to publish June 14, 2023
Write your answer.

Posted

in

Tags:

Comments

Leave a Reply

A Tribute to Dilip Kumar