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

What is format trigger?

2120


What is the difference between primary key and unique key and foreign key in oracle?

1036


What to do if the binary spfile is wrong for the default instance?

1109


How do we get field details of a table?

1027


State any two functions of oracle?

1097


What is a table index?

1168


What is the difference between online and offline backups?

1133


How to connect to oracle using service name instead of sid?

1068


What is data file?

1150


Explain the use of analyse option in exp command.

1195


How to insert multiple rows with one insert statement in oracle?

1134


What are the differences between char and varchar2 in oracle?

1246


Differentiate between function and procedure in oracle.

1154


When do I need to use a semicolon vs a slash in oracle sql?

1142


How does oracle handle read consistency?

1152