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

Answer Posted / dileep.t

If you need the second highest salary only
then following will also work,

select Max(Salary) from TableName
where Salary not in(
Select Max(Salary) from TableName)

Is This Answer Correct ?    20 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does partitioning improve performance sql server?

477


If a table does not have a unique index, can a cursor be opened on it?

509


What is isolation levels?

556


What is sleeping status in sql server?

509


What type of Index will get created after executing the above statement?

630






How to create new tables with "create table" statements in ms sql server?

553


What is difference between rownum and rowid?

497


what are the new features in SSRS?

104


Call by value and call by reference in procedure and function, with NOCOPY.

825


Is it possible to call a stored procedure within a stored procedure?

546


List all types of constraints in sql server?

506


Difference between primary key and clustered index?

492


Explain optimistic and pessimistic concurrency?

529


Which feature in sql server 2008 has surprised you? You can name just one. : sql server database administration

486


What is a heap?

600