can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com

Answer Posted / kumar

1 My Second Answer.

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 ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to achieve Paging of records in SQL SERVER?

592


Explain isolation levels that sql server supports?

565


Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?

78


What are the indexes in sql server?

498


Where sql server usernames and passwords are stored in a sql server?

491






What is attribute hierarchy? : sql server analysis services, ssas

513


What is the use of for clause?

577


What is the default schema of your login session in ms sql server?

586


Explain about sql server login?

589


What is collation?

713


Why and when do stored procedure recompile?

546


What is @@rowcount in sql?

554


How to find a value in another dataset based on current dataset field (ssrs 2008 r2)?

114


What is the recursive stored procedure in sql server?

521


What is tablesample?

569