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

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

Answer Posted / dhaval

we have to use distinct key word there is a possibility
that two person having same salary.



select top 1 sry from (select distinct top 2 sry from emp
order by sry desc)t1 order by sry asc

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you create a clustered index?

1130


1 01 101 01010

2101


What are the different editions available in sql server 2000?

1116


Describe different Processing Modes offered by SSRS?

256


How do you run a trace?

947


What is compound operators?

1118


What is tablix?

169


Where do you find the default Index fill factor and how to change it?

1118


How to resolve the orphan use problem? : sql server security

1075


What the class forname () does?

1142


Can a table have 2 primary keys?

1033


How to copy data from one table to another table?

1054


What are subqueries in sql server?

1195


Can we use max in where clause?

984


What are the differences between stored procedure and the dynamic sql?

1141