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
Is sql an operating system?
How to get each name only once from an employee table?
what is the difference between nested subquery and correlated subquery?
What is the least restrictive isolation level? : Transact sql
List the various privileges that a user can grant to another user?
What are sql indexes?
What is the difference between count 1 and count (*) in a sql query?
Which version of sql do I have?
differentiate between float and double. : Sql dba
What is prepared statement in sql?
What port does sql server use?
What are aggregate functions in sql?
How do I trace sql profiler?
What is a database event trigger?
define join and explain different type of joins? : Sql dba