find the third highest salary?

Answer Posted / nripesh agarwal

select * from emp where salary=(select salary from emp
order by salary desc N,1);


// Put the value for N as for Nth highest salary
// e.g. for 2nd put N=2 , for 3rd put N=3 and so on...

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1949


Do we need commit after truncate?

813


Which data type is a composite type?

736


what is bcp? When is it used?

769


Which is faster union or join?

702






how to create a new view in mysql? : Sql dba

685


Explain lock escalation? : Transact sql

867


How do I view output in sql developer?

806


What is database sql?

707


How can you load microsoft excel data into oracle? : aql loader

811


Is the primary key an index?

763


What is the difference between the conventional and direct path loads? : aql loader

902


What is auto increment in sql?

821


What is sql in oracle?

792


Can you join a table to itself?

712