Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / sandeep
select top(1) a.salary
from
(
select top(2)sal
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
Why do we use joins?
How many types of primary keys are there?
What is sql and its types?
Define sql delete statement.
What are the events on which a database trigger can be based?
Can a trigger call a stored procedure?
how to drop an existing table in mysql? : Sql dba
What's the difference between inner join and left join?
Why function is used in sql?
What are the ways on commenting in a pl/sql code?
Where not exists in sql?
How to get each name only once from an employee table?
what is 'mysqldump'? : Sql dba
Which nosql database is best?
how to create a new table by selecting rows from another table in mysql? : Sql dba