find out the second highest salary?

Answer Posted / janmejaya

select top(1) * from employee where salary in (select
distinct top(2) salary from employee order by salary desc)
order by Salary




Above query is dynamic, if u want 3rd highest then just
change 2 to 3 , Please Try It

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain drop constraint oracle?

659


How to do paging with oracle?

647


Can you drop an index associated with a unique or primary key constraint?

677


How to generate query output in html format?

637


can u plz provide me oca sql dumps please i need them

1567






How to insert a record into a table?

742


How to join two tables in a single query using oracle?

651


How to use null as conditions in oracle?

665


How do I find the database name in oracle?

672


What is rich query?

634


How to convert characters to numbers in oracle?

674


How do we represent comments in oracle?

710


What is pragma autonomous transaction in oracle?

633


What is the minimum client footprint required to connect c# to an oracle database?

643


How can I combine multiple rows into a comma-delimited list in oracle?

670