can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com
Answer Posted / rajendra
Select Top 1 * From Tablename where salary in
(select top 2 salary from tablename order by salary desc)
order by salary asc
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the difference in accessing db between sql server vs sql azure?
Why do you need a sql server?
Can you tell me about the concept of ER diagrams?
What are sql azure firewall rules?
how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?
Can select statements be used on views in ms sql server?
What are xml indexes?
What is cursors?
Define ACID properties in a Database?
Tell me what is the order in which the sql query is executed?
What is clustered primary key?
How many types of relations are there between dimension and measure group? : sql server analysis services, ssas
What is attribute relationships, why we need it? : sql server analysis services, ssas
What is executereader?
What is the difference between a unique key and primary key?