Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / sohail
select empno,ename,sal
from (select ename,empno,sal,dense_rank()
over(order by sal desc)topn
from emp)
where topn=2
| Is This Answer Correct ? | 69 Yes | 46 No |
Post New Answer View All Answers
how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba
How exception is different from error?
What is partition in sql query?
Can we use ddl commands in pl sql?
How to read xml file in oracle pl sql?
explain primary keys and auto increment fields in mysql : sql dba
How to avoid using cursors?
Can 2 queries be executed simultaneously in a distributed database system?
What is multiple partition?
What do we need to check in database testing?
Difference between global and parameter variables?
What is database migration?
What are views in sql?
Is primary key is clustered index?
what are myisam tables? : Sql dba