find out the third highest salary?

Answer Posted / venkatranjith e

Hi All,

This query will give you the o/p.

Select * from EMP A where &n= (select count (distinct
(sal)) from EMP B where B.sal>A.sal)

n = 3 , to display 3rd largest salary.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a directory object?

591


What is an oracle and why it is used?

623


How to return top 5 rows in oracle?

550


Explain temporal data types in oracle

609


What is integrity and what is constraint??Explain with example

1701






How to start instance with a minimal initialization parameter file?

540


What are the uses of a database trigger?

521


Can you tell me how to add new column in existing views?how?How is possible?

942


What are privileges and grants?

572


How to do a full database export?

637


What is the fastest query method to fetch data from the table?

866


What are the different types of partitions in oracle?

496


Can we use oracle pl/sql block in core java? if so how? pls get back to me .....

2507


How to do paging with oracle?

576


various types of hints and their usage

2131