Write a query to find second highest salary of an employee.
Answer Posted / rajasekhar.v
For selecting Nth highest salary...
SQL> select rownum rank,ename,sal from
(select ename,sal from emp order by sal desc)
group by rownum,ename,sal
having rownum = &n;
'n' may be any valid number required..
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the default isolation level in sql server? : Transact sql
What is numeric function sql?
Does sql require a server?
Which one is better subquery or joins?
Can you join views in sql?
What is the best partition size for windows 10?
What are the different types of sql commands?
What is trigger types of trigger?
What will you get by the cursor attribute sql%rowcount?
what is the difference between union and union all? : Sql dba
What is a primary key? Explain
how to use case expression? : Sql dba
Which is better cte or subquery?
What are sql constraints?
Enlist the advantages of sql.