Share Blog

Saturday, March 08, 2014

How to Find MAXIMUM and MINIMUM values from table

The Max Function:The MAX() Function returns the first values of the select column
Syntax
SELECT MAX(column_name) FROM table_name
We have the following "Salary"table

Now we want to find the MAX value of sal column
We use the following SQL Statement :

Select MAX(sal) from salary



The MIN Function:The MIN() Function returns the first values of the select column
Syntax
SELECT MAX(column_name) FROM table_name
We have the following "Salary"table

Now we want to find the MIN value of sal column
We use the following SQL Statement :

Select MIN(sal) from salary


No comments:

Post a Comment