Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to find the second highest salary from emp table?

Answer Posted / abhijit banik

To get the n-th highest salary from employee table in oracle-10g
--------------------------------------------------------------
select min(salary)
from
(
select rownum rn, salary
from
( select distinct(salary) from employee order by salary desc )
)
where rn<=&n+1

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the order of sql statement execution?

1043


What is flag in sql?

1032


What is difference between db2 and sql?

997


why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

1106


What is pl sql in dbms?

949


Why we use triggers in mysql?

992


How do I count records in sql?

998


Write a query to display the current date in sql?

1020


What is trigger in pl sql?

990


Are subqueries better than joins?

972


What are % type and % rowtype?

1028


Explain select statements in sql?

1056


What is sql performance tuning?

917


How do I run a query in pl sql developer?

993


Is it possible to update views?

959