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

What is sub query and its properties?

964


What is the difference between a fill factor of 100 and 0?

965


What does this statement do @@rowcount?

954


What is built-in function?

978


What are the types of ssrs?

145


What is cursors? And what are the different types of cursor?

1127


What are the differences between clustered and non-clustered index?

1003


your distribution database is full what will u do

2159


What is the difference between online clustering and Offline clustering?

2393


How to enter binary string literals in ms sql server?

1127


How to execute stored procedure in select statement sql server?

1030


You have to store user responses of ‘yes’ and ‘no’ what kind of data type is best suited for this task?

928


Which is the latest version of sql server and when it is released?

1089


What is difference between sql and sql server?

973


How do triggers work?

918