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
How to return the top 5 rows from a select query in ms sql server?
What is the purpose of update statistics and scope_identity() function?
How to update multiple rows with one update statement in ms sql server?
Explain what are partitioned views and distributed partitioned views?
What is the maximum length of an alert name?
What do you know about system database? : SQL Server Architecture
What is the web service used for reporting services?
how many clustered indexes can be created on a table? : Sql server database administration
Tell me what are cursors and when they are useful?
What is the difference between index seek vs. Index scan?
Is truncate a dml command?
What is sql stored procedure?
What is bookmark link in ssrs?
Can a trigger be created on a view?
What is the use of =,==,=== operators?