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 / prasoon madnawat

i forgot order by in da last post
SQL Server:
Select MIN(Salery) from (SELECT TOP 2 * from EMPLOYEE order
by Salery DESC)

Oracle:
Select MIN(Salery) from (SELECT * from EMPLOYEE where ROWNUM
<3 order by Salery DESC)

MySQL
Select MIN(Salery) from (SELECT * from EMPLOYEE order by
Salery DESC LIMIT 2)

likewise for 2nd minimum salery.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain update progress control?

874


12. Types of polymorphisem[Run and Design Exp.]

2011


data types used in validation control

2161


What is application frame host?

1007


Explain the Lapsed Listener problem in .net

1106


Explain domestic architecture artifacts? : .NET Architecture

895


I am working with asp.net 2005 and Crystal report 10. I have an image field on my dataset to show on Crystal report.And the image is shows dynamically from database in image field of CR. The image field is showing well on my Crystal report on its first page with all other data but when i click to open second page of CR,it does not show any data on that.I found that this is because of adding the image field on crystal report. Because when i remove the image field from the CR then it will run both the pages of CR. I am using the Page Load event to bind CR data with Database. And i have already check with the Init event to bind CR , but it still not shows the data on second page when i use image field on that. Please give solution for that.....

1827


what are the events for a form?

2051


Explain COM with example?

897


Explain the process of gc?

939


Explain hard disk and what is its purpose? : Dot net architecture

885


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

908


What are different types that a variable can be defined and their scopes ?

990


Explain the difference between inprocess vs out process session state : Dot net architecture

1009


Explain difference between state server and sqlserver? : .NET Architecture

897