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


Please Help Members By Posting Answers For Below Questions

What is normalization and denormalization in sql server?

541


Which are the third-party tools used in sql server and why would you use them?

496


How optimize sql query with multiple joins in sql server?

417


What is CTE in SQL

546


What are the filtered indexes?

605






What are SSL and TSL protocols?

588


hi, how to link a text file and a .rpt file in my tables of sql server and to retrieve those records for further use. reply me as soon as possible.

1564


What is a partition key?

526


What is use of @@ spid in sql server?

687


What is the correct order of the logical query processing phases?

529


Do you know the cursor types?

622


Explain left outer join and right outer join?

563


Are connections to sql server encrypted?

581


Explain the third normal form(3nf)?

527


How do you create an execution plan?

499