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
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
Do we need commit after truncate?
Which data type is a composite type?
what is bcp? When is it used?
Which is faster union or join?
how to create a new view in mysql? : Sql dba
Explain lock escalation? : Transact sql
How do I view output in sql developer?
What is database sql?
How can you load microsoft excel data into oracle? : aql loader
Is the primary key an index?
What is the difference between the conventional and direct path loads? : aql loader
What is auto increment in sql?
What is sql in oracle?
Can you join a table to itself?