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

What is object data modeling?

506


What are operators in oracle?

526


How do I limit the number of oracle database connections generated by weblogic server?

543


what is reindexing?

1177


what are bitmap indexes? How does they work?

1716






What is an oracle tablespace?

605


How to apply filtering criteria at group level in oracle?

586


How translate command is different from replace?

544


What is an oracle transaction?

586


What happens to indexes if you drop a table?

698


What is translate in oracle?

618


Is truncate autocommit in oracle?

635


Explain the characteristics of oracle dba?

636


How to drop a stored procedure in oracle?

590


Calculate difference between 2 date / times in oracle sql?

571