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

Answer Posted / rajendra

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a sql query to sort on different column name according to the parameters passed in the function?

695


what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?

5683


What are the difficulties faced in cube development? : sql server analysis services, ssas

798


What is the significance of master, tempdb and model databases?

709


Differentiate between a local and a global temporary table?

709






Explain filtered indexes?

747


How to check table values in sql server?

696


What is optimization and its types?

713


Define tool Manage Statistics in SQL Server 2000 query ?

736


What happens to a trigger with multiple affected rows?

691


Can one drop a column from a table?

752


you want to be sure that queries in a database always execute at the maximum possible speed. To achieve this goal you have created various indexes on tables which other statement will keep the database in good condition? : Sql server administration

742


How to create “dependant” parameter “make, model, year”

105


How are the exceptions handled in sql server programming?

757


How do I start sql server 2016?

688