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...

find out the second highest salary?

Answer Posted / raghu

second highest salary department wise query would be this

select e.dept_id,e.salary,e.emp_name,e.rank from (select
dept_id,emp_name,salary,dense_rank() over (partition by
dept_id order by salary desc nulls last) rank
from employee)e
where e.rank = 2

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to handle a single quote in oracle sql?

1053


normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi

2207


What is the difference between truncate & delete command?

1183


How to unlock the sample user account in oracle?

1018


Differentiate between pre-select and pre-query?

1107


What is save point in oracle database?

1296


What is user managed backup in Oracle?

1146


How do you bind variables in oracle?

980


How to use "while" statements in oracle?

1327


How to bring a tablespace offline?

1065


What is hot backup and logical backup?

1051


Explain the characteristics of oracle dba?

1120


Difference between varchar and varchar2 data types?

1185


How do I escape a reserved word in oracle?

1200


How many types of tables supported by oracle?

1077