Answer Posted / ramesh mopuri
okay above queries are fine
but in a table there are 99 salaries, so i want to pick the
50th highest salary is it possible to wright the query same
above for the get 50th high salary. absolutely not. see my
query for the get Nth salary in a table.
Select ename,sal,deptno from emp a
where &n=
(select count(distinct(sal))from emp b
where a.sal<=b.sal)
order by deptno;
after enter this query the system ask N value and give 50
the result will be shown 50th highest salary. Please reply
me whether its working or not.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
How to convert characters to numbers in oracle?
How do I connect to oracle database?
What is recycle bin in Oracle?
What is recovery manager in Oracle?
How index is implemented in oracle database?
definition of cluster and non-clustered index?
How to sort output in descending order in oracle?
How to retrieve data from an explicit cursor?
How to drop an index?
How do I spool to a csv formatted file using sqlplus?
What is the recommended interval at which to run statspack snapshots, and why?
What is the difference between $oracle_base and $oracle_home?
What does sharding mean?
what are the default admin accounts in Oracle 10g ?
What is an oracle and why it is used?