how to find nth highest salary
Answer Posted / aman kaushal
select salary from customer order by salary desc limit n,1;
here n is the array value 1st highest value starts with 0
value and then 1.
e.g
find the 2nd highest salary.
select salary from customer order by salary desc limit 1,1;
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
what is a self join? Explain it with an example? : Sql server database administration
What is database replication?
What is the difference between having clause and where clause in sql server?
what is a major difference between sql server 6.5 and 7.0 platform wise? : Sql server database administration
Explain the concepts and capabilities of sql server?
How to transfer an existing table from one schema to another schema in ms sql server?
Explain how to integrate the ssrs reports in application?
How to Improve the performencs of SQL Server 2005 exclude stored Procedure and Indexes?
What is a not null constraint?
What do you understand by the analysis services in sql server?
Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?
What type of Index will get created after executing the above statement?
What is compound operators?
How to automatically create a log when an exception is being received into SQL Server?
How to create function with parameter in sql server?