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 sql server transaction log file?
How to provide default values to stored procedure parameters?
Define right outer join?
How to use old values to define new values in update statements in ms sql server?
How many joins in sql server?
what is a deadlock? : Sql server database administration
Explain nested trigger in sql?
How to update a field in SQL after ALTERING a row?
Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?
How would we use distinct statement? What is its use?
Scalability, Availability, Integration with internet, etc.)?
Explain what are the basic functions for master, msdb, model, tempdb databases?
What is a transact-sql statement?
Write the queries for commands like Create Table, Delete table, Drop Table etc.
How to modify an existing stored procedure in ms sql server?