Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / sandeep
select top(1) a.name
from
(
select top(2) name,salary
from
employee
order by salary desc
)a
order by a.salary asc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is data types in sql?
Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?
How does postgresql compare to mysql?
What are dml commands?
What are the advantages of pl sql?
what are the types of subquery? : Sql dba
Which nosql database is best?
what is sql? : Sql dba
what is sql profiler? : Sql dba
What is pl/sql language case sensitive?
how to present a past time in hours, minutes and seconds? : Sql dba
Which join is default?
How do I view a procedure in sql?
What is scope and visibility in PL/SQL?
What is anonymous block in sql?