find out the second highest salary?

Answer Posted / yaseen syed

select *
from
(select empno,ename,sal,rank() over(order by sal desc)
ranking from emp)
where ranking=2;

and u can find the nth highest sal by replacing 2 by your
number

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of oracle 12c?

555


I creat Credit memo in AR. Now i want revers the Credit Memo.how you can revers that what out any aditional entry.

1854


What is save point in oracle database?

725


I am using an Oracle 8i Database my data contains Clob data. I am using toad version 7.6 i am able to get the data in toad but unable to extract the data in excel.when trying to extract the data into the excel the toad error says out of memory. Can any body please help me to extract the data through the same toad version. Thanks in advance

1846


Which dictionary tables and/or views would you look at to diagnose a locking issue?

1488






What are the various types of snapshots ?

562


What are the different types of synonyms?

594


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.

1607


What is Reduced List of Values?

1704


What is an anonymous block?

623


Why do we need integrity constraints in a database?

586


How do I use unicode codesets with the weblogic jdriver for oracle driver?

550


What do you mean by redo log file mirroring?

559


How to drop an existing view in oracle?

569


How to specify default values in insert statement using oracle?

562