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
how to select first 5 records from a table? : Sql dba
Is and as keyword in pl sql?
What are the types of join in sql?
how to fetch alternate records from a table? : Sql dba
How do you go back in sql?
What is sap sql?
What is data control language?
What is trigger in pl sql?
Compare sql & pl/sql
what is the difference between char_length and length? : Sql dba
What is db journal file?
What is a nested table in word?
what is innodb? : Sql dba
Explain the types of joins in sql?
Is sql a scripting language?