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
What is the non-clustered index in sql?
What is the difference between join and natural join?
Why self join is used in sql?
what is the difference between $message and $$message? : Sql dba
What is a sql trace file?
How to call shell script from pl sql procedure?
Explain raise_application_error.
What is sql injection vulnerability?
Is a secondary key the same as a foreign key?
how many values can the set function of mysql take? : Sql dba
What is the purpose of primary key?
Which are the different character-manipulation functions in sql?
what are rollup and cube in t-sql? : Transact sql
what is top in tsql? : Transact sql
How do I view tables in sql developer?