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 define the name and server for a new dsn?
How to enter binary string literals in ms sql server?
What are the main differences between #temp tables and @table variables and which one is preferred?
What is the tcp/ip port on which sql server runs?
What are scalar functions?
What is a result set object returned by odbc_exec()?
What is the sql case statement used for?
What is PROJECTION Operation?
How to change parameter value inside the report?
What is the maximum size of column in sql server?
What are the source of constraints?
What is user-defined functions? What are the types of user-defined functions that can be created?
What is the temp table?
how you can get the list of largest tables in a database? : Sql server administration
Where are stored procedures in sql server?