- MIN() function return small value of column
- MAX() function return large value of column
MIN() Syntax
SELECT MIN(YourColumnName) FROM YourTableName WHERE Condition
MAX() Syntax
SELECT MAX(YourColumnName) FROM YourTableName WHERE Condition
Example
1. SELECT MIN(Salary) AS LowSalary FROM Employee
2. SELECT MAX(Salary) AS HighSalary FROM Employee
- MAX() function return large value of column
MIN() Syntax
SELECT MIN(YourColumnName) FROM YourTableName WHERE Condition
MAX() Syntax
SELECT MAX(YourColumnName) FROM YourTableName WHERE Condition
Example
1. SELECT MIN(Salary) AS LowSalary FROM Employee
2. SELECT MAX(Salary) AS HighSalary FROM Employee
No comments:
Post a Comment