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
Which are the different character-manipulation functions in sql?
How to use sql*plus built-in timers?
What is the purpose of a secondary key?
what are date and time data types in mysql? : Sql dba
Can we rollback delete command?
How can we store rows in PL/SQL using array?
Write an sql query to select all records from the table?
What is a trigger word?
Why does sql need a server?
What is group by in sql?
What is the difference between database trigger and stored procedure?
What happens when a trigger is associated to a view?
What is pl/sql language case sensitive?
what is a constraint? : Sql dba
what is union, minus and interact commands? : Sql dba