how to find nth highest salary
Answer Posted / sudhir
DISPLAY THE RECORDS WHO'S GETTING 3RD HIGHEST SALARY.
SELECT * FROM EMP E1
WHERE 3 =(SELECT COUNT(DISTINCT(SAL))
FROM EMP E2
WHERE E1.SAL <= E2.SAL)
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the properties of subqueries in sql server?
Explain Normalization and DE normalization
What is the maximum rows in sql server table?
What is SQL Azure Federations?
What specific conditions database should meet, before you can bulk copy data into it using bcp?
Can we perform backup restore operation on tempdb?
How do we know if any query is retrieving a large amount of data or very little data?
What is a join in sql? What are the types of joins?
What are the tools available in market as an alternative to sql server reporting services?
You are doing log shipping due to some reasons it is failing. How you will proceed from there
How the authentication mode can be changed?
What is the recommended total size of your memory optimized tables?
Is truncate a dml command?
What is in place upgrade in sql server?
What is use of except clause? How it differs from not in clause?