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
What is raw datatype?
What are the different pseudo commands? Explain in general?
What is index-organized table in Oracle?
Explain how are indexes update?
What privilege is needed for a user to create tables in oracle?
How do I spool in oracle?
What is meant by a deadlock situation?
State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.
What is a parameter file in oracle?
How will you write a query to get a 5th rank student from a table student_report?
Using the relations and the rules set out in the notes under each relation, write table create statements for the relations EMPLOYEE, FIRE and DESPATCH. You should aim to provide each constraint with a formal name, for example table_column_pk.
Explain an index?
What is the Tune Query
What is an oracle table?
Why do we use coalesce function in oracle?