how to find the second highest salary from emp table?
Answer Posted / vijay kintali
select e1.ename,e1.sal from emp e1 where n=(select count
(distinct e2.sal) from emp e2 where e1.sal<=e2.sal);
Note:n here is nth highest salary.......
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do you update sql?
What is nosql vs sql?
What are inner outer left and right joins in sql?
What is the difference between left join and right join?
How to get unique records from a table?
how to convert character strings to dates? : Sql dba
What are expressions?
What are the two types of exceptions.
how to drop an existing view in mysql? : Sql dba
Write the command to remove all players named sachin from the players table.
What is difference between table and view?
differentiate between float and double. : Sql dba
What is the process of debugging?
What are the different set operators available in sql?
Does sap use sql?