adspace


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

How raid can influence database performance?

1116


what is the difference between openrowset and openquery?

1193


What is sql server query analyzer?

1126


What is acid mean in sql server?

1244


How to connect php with different port numbers?

1186


Can sql servers link to other servers like oracle?

915


How do I create a trace in sql server?

1118


How do I find the sql server version?

1101


Is it possible to have clustered index on separate drive from original table location?

1039


What is in place upgrade in sql server?

1125


How to provide default values to function parameters?

1256


How do I start sql server 2017?

1015


Explain system functions or built-in functions? What are different types of system functions?

1065


What is a coalesce function?

1282


Why should you use or avoid select * statements?

1108