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

Which operator is used in query for pattern matching?

1090


Does normalization improve performance?

1041


How do you optimize a stored procedure in sql?

960


What is the use of & in pl sql?

1046


What is string join?

981


What is user in sql?

1027


What are the uses of sysdate and user keywords?

1105


What is a primary key example?

965


What are the main features of cursor?

1071


What are the advantages of normalization?

1078


How can one get sql*loader to commit only at the end of the load file? : aql loader

1060


How can you get sql*loader to commit only at the end of the load file? : aql loader

1015


Is inner join same as self join?

1120


Can we use loop in sql?

972


What are different types of tables in sql?

999