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
Leave a Reply