adspace


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

What are the source of constraints?

1010


How efficient you are in oracle and SQL server?

1258


If any stored procedure is encrypted, then can we see its definition in activity monitor?

1073


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

1041


What is a view in sql?

1043


How can I check that whether automatic statistic update is enabled or not?

1113


Why should you use or avoid select * statements?

1112


How can we solve concurrency problems?

1123


Does view occupy space?

1022


What kind of problems occurs if we do not implement proper locking strategy?

1501


How to provide default values to function parameters?

1261


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

1300


You have a stored procedure, which execute a lengthy batch job. This stored procedure is called from a trigger you do not want to slow the data entry process you do not want trigger to wait for this batch job to finish before it completes itself what you can do to speed up the process?

1216


What is acid mean in sql server?

1247


Can we do dml on views?

1039