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...

how to find the 2nd higgest salary in the column for example
take table name is employee?
And also find bottom 2nd lowest salary ?

Answer Posted / sudhir

1. 2nd highest salary=>

Select top 1 * from (select top 2 * from emo order by sal
desc) order by sal asc

2. 2nd lowest salary

Select top 1 * from (select top 2 * from emo order by sal
Asc) order by sal Desc

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens when you try to update data in a dataset in .net while the record is already deleted in sql server as backend?

971


What is a managed code? : Dot net architecture

954


Are there any third party logging components available?

924


Whate are resource files? How are they used in .net?

893


Explain the Lapsed Listener problem in .net

1155


Xmlserializer is throwing a generic "there was an error reflecting myclass" error. How do I find out what the problem is?

944


What is biginteger and when would you use that?

927


Define cache coherency and how is it eliminated? : Dot net architecture

926


Explain how does .net mobile work? : Microsoft dot net mobile

847


What is MS chart control in visual studio?

1210


Can you explain server controls in atlas?

958


What does the term "green architecture" mean? : Dot net architecture

874


How does .net mobile work? : Microsoft dot net mobile

932


what is the difference between master page and content page?

2589


How is the using() pattern useful? What is idisposable?

925