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 data definition language?
What is the use of sqldataadapter?
How can a pl sql block be executed?
Explain lock escalation? : Transact sql
What does desc stand for?
What is the non-clustered index in sql?
Which is better varchar or nvarchar?
How to order siblings in oracle hierarchy queries?
what are wild cards used in database for pattern matching ? : Sql dba
Why having clause is used in sql?
what are the different tables present in mysql? : Sql dba
How exception is different from error?
Write a sql query to get the third highest salary of an employee from employee_table?
What are triggers in sql?
Is not null in sql?