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

Answer Posted / kavitha.r

This query is generalised query if u replace 2 by 100 ,
then you will get 100th max salary


select top 1 salary from employee where salary in( select
top 2 salary from employee order by salary desc) order by
salary asc

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

You have several tables, and they are joined together for querying. The tables contain both clustered indexes and non clustered indexes to optimize performance, how should you distribute the tables and their indexes onto different file groups?

549


Does partitioning ssd reduce performance?

481


How to list all login names on the ms sql server?

528


Can I disable or restrict ssrs export formats (rendering formats)?

108


What types of Joins are possible with Sql Server?

536






Describe the functionalities that views support.

646


is it important for a database administrator to understand the operating system and file access? : Sql server administration

577


How to return the date part only from a sql server datetime datatype?

566


How to use clusters?

543


What is not null constraint?

611


What is the difference between nvl and nvl2?

542


Which table keeps the locking information?

515


What is acid mean in sql server?

566


Explain about system database?

572


Do you know hot add cpu in sql server 2008?

530