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 enter substitution variable in oracle?
How do we represent comments in oracle?
How to retrieve values from data fields in record variables?
What is set verify off in oracle?
Can we store images in oracle database?
What do you mean by redo log file mirroring?
What is meant by joins?
1) What is ONE_SIZE_FITS_ALL approach? 2) Explain the Common & Variable Header of DATA FILE? 3) What are the Drawbacks to using OMF DB? and the Advantages? 4) List out the Advantages of Undo T.spaces over the Undo SEGMENT? 5) Difference between the Temporary tablespace with TEMPFILE and the Tablespace with TEMPORARY Keyword? 6) What are the situation extents are freeing for reuse.
What is define in oracle?
What privilege is needed for a user to query tables in another schema?
What is meant by an index?
How to return top 5 rows in oracle?
What is recovery manager in Oracle?
How to connect to a remote server?
What is a trigger and what are its types?