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

Answer Posted / sandeep rana

Select top 1 salary from table where salary in(select top 2
salary from table order by salary desc)order by salary

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

difference between Clustered index and non clustered index ?

570


How to receive output values from stored procedures?

477


Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?

538


Explain about service Broker functions?

613


What is tempdb database? : SQL Server Architecture

602






What are the export options of ssrs?

126


is there a column to which a default can't be bound? : Sql server database administration

533


What is application role in sql server database security? : sql server security

551


How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.

3370


What is report server project?

106


Where are stored procedures in sql server?

564


How do I find my localdb version?

489


List out the different types of locks available in sql server?

552


How to get @@error and @@rowcount at the same time?

565


how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A

1212