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
explain the delete statements in sql
What is the use of prepared statement?
what are the different type of sql's statements ? : Sql dba
Does oracle roll back the transaction on an error?
what is a materialized view? : Sql dba
How to return an array from java to pl/sql?
What is a memo field?
What is the life of an sql statement?
what is data integrity? : Sql dba
What is the difference between rollback and rollback to statements?
How is a PL/SQL code compiled?
What is the purpose of the partition table?
Can a foreign key have a different name?
What is sql query limit?
What is sql comments?