Find out the 3rd highest salary?
Answer Posted / srijith pillai
This will give you third highest salary
select ename, sal from
(Select name, sal, rownum()Over(Order by sal Desc) rt
FROM emp)
where rt = 3;
| Is This Answer Correct ? | 13 Yes | 19 No |
Post New Answer View All Answers
What is a null value?
Is coalesce faster than isnull?
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
Why use subqueries instead of joins?
What is sqlerrm?
Is t sql a programming language?
What is the difference between sql and mysql?
What are different types of keys?
Is sql open source?
How do you modify a trigger?
Which is faster joins or subqueries?
what is the stuff function and how does it differ from the replace function? : Sql dba
Why do we use triggers?
How do I view a procedure in sql?
which tcp/ip port does sql server run on? : Sql dba