how to find the second highest salary from emp table?
Answer Posted / ravi
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP n salary
FROM employee
ORDER BY salary DESC) a
ORDER BY salary
where n is the nth highest salary
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is nvarchar max in sql?
What is optimistic concurrency control? : Transact sql
What is the difference between the conventional and direct path loads? : aql loader
What is foreign key and example?
What is before and after trigger?
Can we join tables without foreign key?
How to add, remove, modify users using sql?
What is difference sql and mysql?
What are expressions?
What is parallel hint?
what is bdb (berkeleydb)? : Sql dba
What is a unique key?
What are %type and %rowtype for?
how to add a new column to an existing table in mysql? : Sql dba
Is like operator in sql case sensitive?