adspace


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

Answer Posted / kumar

1 My Second Answer.

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 ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the properties of the transaction?

1073


What is the difference between upgrade and migration in sql server?

1184


How efficient you are in oracle and SQL server?

1257


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

1050


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

1065


What is a view in sql?

1040


What is normalization and what are the advantages of it?

1055


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

1023


What is in place upgrade in sql server?

1126


What are the kinds of subquery?

1107


What are the pros and cons of putting a scalar function in a queries select list or in the where clause?

1299


How do I find query history in sql server?

1024


what is spatial nonclustered index

1058


How do I start sql server 2017?

1015


What is a scheduled job or what is a scheduled task?

1039