Find out the 3rd highest salary?

Answer Posted / lalit dwivedi

select a.salary
from emp a
where 3=(select count(distinct(b.salary))
from emp b
where a.salary<=b.salary)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is a database?

652


What are the differences between in and exists clause?

572


What does stand for in sql?

524


Sql technical questions

779


Do triggers have restrictions on the usage of large datatypes, such as long and long raw?

692






What is database white box testing and black box testing?

641


What is a nested table in word?

534


what is the difference between inner and outer join? Explain with example. : Sql dba

553


What are the topics in pl sql?

527


Is it possible to create startup or shutdown trigger for on-schema?

589


Explain some predefined exceptions.

590


Why do we go for stored procedures?

527


What is relationship? How many types of relationship are there?

594


How to select all records from the table?

612


a table has 2 classifications 1)liabilities 2)earnings this liabitity has 2 elements with 2 input values and the earnings have 2 elements with 2 input values i wrote a query so that my input is liability savings amount1 amount2 xxxx null xxxxxx 0 xxx1 null xxxxx1 0 null yyyy 0 yyyy null yyy1 0 yyy1 my problem is --when i developed a report(d2k) with this data my o/p is liabilities,amount1,savings,amount2 xxxx xxxxxx xxx1 xxxxx1 yyyy yyyy yyy1 yyy1 how could i move this savings,savings values 2 palces up. can any body provide me witha better solution

1778