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 relationship? What number of sorts of relationship are there?
What the different components in replication and what is their use?
What is a derived table?
Explain a differential backup?
How to copy the tables, schema and views from one sql server to another?
If a stored procedure is taking a table data type, how it looks?
What is the difference between char, varchar and nvarchar?
What is sparse columns of sql server 2008?
Can we write ddl in trigger?
Can I delete event logs?
What are the requirements for sql server 2016?
How to display a past time in days, hours and minutes?
Why we need sql server?
How to create prepared statements using odbc_prepare()?
How to execute multiple stored procedures at one time in sql server?