how to find the second highest salary from emp table?
Answer Posted / naveed saleh
You can use this for getting nth highest salary from
Employee table as follows
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP n salary
FROM employee
ORDER BY salary DESC) a
ORDER BY salary
where n > 1 (n is always greater than one)
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what are the drivers in mysql? : Sql dba
what are the differences between char and varchar? : Sql dba
How do I find sql profiler?
what is rollback? : Sql dba
Define the select into statement.
what is a trigger? : Sql dba
What is minus?
Explain normalization and what are the advantages of it?
How to load data with sql*loader?
How many types of privileges are available in sql?
What is database migration?
Why do we use joins in sql?
Can sql function call stored procedure?
What is crud sql?
Is left join faster than join?