top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Oracle: how to find out 9th highest salary from emp table?

+1 vote
528 views
Oracle: how to find out 9th highest salary from emp table?
posted Mar 13, 2015 by Suchithra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
 
Best answer

SELECT DISTINCT (a.sal)
FROM EMP A
WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal <=b. sal);

Enter value for n: 2
SAL
---------
3700

answer Mar 16, 2015 by Arun Gowda
Similar Questions
+1 vote

How we can get nth max salary from Employee Table (EMP_ID, Salary)

Emp_id salary
1 1000
3 2000
4 16000
2 10000
7 19000
8 12000

e.g. for 3rd max salary, salary is 12000 so answer will be emp_id : 8

+1 vote

How to display the names of employees who are working as clerk , salesman or analyst and drawing a salary more than 3000?

...