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

Is it possible for a stored procedure to call itself or recursive stored procedure?

481


What are some of the pros and cons of not dropping the sql server builtinadministrators group? : sql server security

524


What is sql server profiler trace data file?

563


What are the advantages of mirroring?

548


what changed between the previous version of sql server and the current version? : Sql server database administration

498






How to create a new login name in ms sql server?

524


What is the sql profiler?

525


What are the lambda triggers?

463


What are the differences between clustered and non-clustered index?

513


Which joins are sql server default?

487


Tell me what is difference between view and materialized view?

501


You notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it?

618


Write a SQL command to insert and update only a particular field?

593


What is data modification?

489


What is the preferred way to create a clustered and non-clustered index? Which index should you create first the clustered or non-clustered?

456