find out the third highest salary?

Answer Posted / sudheer

Guys Few of you have submitted an optimal query.

select distinct sal from emp A where 3 = (select count(sal)
from emp B where a.sal > b.sal)

However the integer 3 will not give the third highest salary
as expected. Point should be noted that the row starts with
zero.

so the actual result will the fourth highest salary with the
above query.

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does sharding mean?

539


How to define an anonymous block?

618


what is the scripts in data base?

1602


nw i'm doing MBA system and planning to do oracle,database management.tell me that whether it is useful r not?.refer any course for my carrier pls

1742


while i take backup using ibm tsm the following errors occurred: rman-03009 ora-19513 ora-27206 ora-19502 ora-27030 ora-ora19511

3869






What are joins, explain all types of joins?

1722


What are the ways tablespaces can be managed and how do they differ?

1616


Explain do view contain data?

583


Explain a private synonyms?

633


what are bitmap indexes? How does they work?

1716


Explain the use of tables option in exp command.

591


How many types of database triggers exist?

575


Explain how are indexes update?

621


What is a nvl function? How can it be used?

560


What is the usage of synonyms?

585