How to retrieve 5th highest sal from emp table?

Answer Posted / venkata

hi, earlier query return sal in asending order and when
duplicate salries are there the earlier highest salary
position returns no rows. I hope this is better query.


select * from (select * from emp order by sal desc)
group by
rownum,empno,ename,job,mgr,hiredate,sal,comm,deptno having
rownum=&n

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we protect our pl/sql source code?

586


What are group functions in oracle?

592


Explain parameter file in oracle.

586


What to do if the binary spfile is wrong for the default instance?

571


How do I uninstall oracle 11g?

572






master table and child table performances and comparisons in Oracle ?

1674


What is the difference between hot backup and cold backup in oracle?

528


How to convert characters to numbers in oracle?

600


What are the various types of snapshots ?

570


How can I create database in oracle?

579


How to loop through data rows in the implicit cursor?

549


What are operators in oracle?

536


What is system tablespace?

642


Is insert autocommit in oracle?

616


How to create a stored procedure in oracle?

587