How will i get the n'th highest salary????????

Hi
plz can anybody tell me the query to find nth highest salary from emp table???
Thanx
Gagan

try this
SELECT employee_name, salary,
       RANK() OVER (order by salary) AS ranking
FROM   employee) empor to get the particular ranking
SELECT emp.employee_name, emp.salary
FROM
     (SELECT employee_name, salary,
             RANK() OVER (order by salary) AS ranking
      FROM   employee) emp
WHERE emp.ranking = <rank number>

Similar Messages

Maybe you are looking for

  • WS14000133- Parallel Approval

    Hi, In SRM 5.0 workflow WS14000133- n level approval of SC at header level, Is there a feature by which we can have parallel approval, but ensure that SC goes to next level only when all the parallel approvers have approved the cart? Currently in our

  • How to Include order creation business process in the project.

    Hi, I have created Implementation Project in Project Administration. Now I want to Include order creation business process in the project. Can anybody guide me how to incude order creation business process in the project. & which T-codes I need to us

  • Searching from array1 to array2 in the fastest way beside using looping

    I have 2 array 1d of object, what i want to do is searching data "a" from array1 in array2 in the fastest method because the amount of data in each array reached almost 10000 data. thanks.

  • What is the BEST way to do a dynamically loading image slideshow?

    Hey guys! I know a little Flash, a little Dreamweaver, a little PHP, pretty much a little of everything. I'm an artist and would like to publish a slideshow, which I would update often, smack on the front of my personal website. What is the easiest,

  • Please help: "download failed" - trouble downloadi...

    hello there, i've just finally managed to install ovi player (though on my father's laptop; did not work for my pc nor my dad's), registered under comes with music and was all good to go -- or so i thought. i'm having trouble downloading anything. ea