how to find nth highest salary
Answer Posted / rabi
SELECT A.SAL
FROM TABLE A WHERE &N=(SELECT COUNT(DISTINCT(B.SAL))
WHERE A.SAL<=B.SAL);
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the restrictions while creating batches in sql server?
How do you maintain database integrity where deletions from one table will automatically cause deletions in another table?
What is sql server english query?
Where are stored procedures in sql server?
What is indexing explain it with an example?
What is forward - only cursors / read only cursor?
If no size is defined while creating the database, what size will the database have?
Define constraints and give an example of their use?
What is Service Broker in sql server 2012?
Where sql server user names and passwords are stored in sql server? : sql server database administration
Do you know what is sql service broker?
What is the difference between delete and truncate statements?
List the different normalization forms?
Write an sql query to sort a table according to the amounts in a row and find the second largest amount.
What is data set in report?