Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I Have Employee table having column name as ID,SALARY
how to get second max salary from employee table with id
ex
ID SALARY
1 20000
7 37000
2 5000

Answer Posted / sudip mondal

select top 1 from employee where ID in (select top2 ID from
employee order by Salary desc) order by Salary asc

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is order of B+tree?

1058


What are the fixed server level roles? : sql server security

1049


Does an index slow down updates on indexed columns?

910


Define union, union all, minus, intersect?

932


Difference between connected and disconnected database in .net with sql server?

1032


what purpose does the model database serve? : Sql server database administration

919


What is surrogate key? : sql server analysis services, ssas

1053


Differentiate sql server reporting services vs. Crystal reports?

186


What are different types of raid configurations? : SQL Server Architecture

999


Explain how to use linked server?

925


How to filter records of table in SQL SERVER?

1023


how we use window authentication connection with sql server.?

1082


How to receive returning result from a query?

1032


Create and insert into temp table in sql server?

974


Give me a SQL Query to find out the second largest company?

1119