Write a sql query to find the 10th highest employee salary from emp table. Explain your answer
Answers
Answered by
0
Answer:
select top 1 * from ( select top 10 * from emp) order by salary;
Explanation:
You can do it by many methods. You can use limit to fetch selected sorted data from database.
The best one is to using subquery. In the above query, the inner query will fetch first 10 rows from the table and then the outer query will give u the 10th highest salary from it.
Similar questions