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 I pipe the output of one isql to another?
What are stored procedures used for?
How to start oracle sql developer?
List out the acid properties and explain?
Explain locks? : Transact sql
What is the use of & in pl sql?
Does sql require a server?
What are different types of keys?
what is self-join? : Sql dba
Describe types of sql statements?
What is sharding in sql?
What is a constraint?
what are the 'mysql' command line arguments? : Sql dba
Is sql difficult?
What is a temporal table?