How to retrieve 5th highest sal from emp table?

Answer Posted / aryasen vaikom

SELECT DISTINCT (a.sal)
FROM EMP A
WHERE 5= ( SELECT COUNT (DISTINCT (b.sal))
FROM EMP B
WHERE a.sal<=b.sal )

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between char and varchar2 in oracle?

563


Is oracle a language?

522


What is a tns file?

500


Can we write insert statement in function in oracle?

534


Difference between pre-select and pre-query

575






What is sharded cluster?

518


What is hot backup and logical backup?

608


How to create lov dynamically at runtime & attach to text field?

660


Which dictionary view(s) would you first look at to understand or get a high-level idea of a given Advanced Replication environment?

1480


How to loop through data rows in the implicit cursor?

539


Difference between the “verify” and “feedback” command?

773


Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current date, changes the date format to include minutes & seconds, issues a drop table command, displays the date again, and finally exits.

1575


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

561


Please explain joins in oracle?

547


How can I introduce multiple conditions in like operator?

553