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 / prasad237

with x as(select row_number over(order by sal desc) as rid,* from emp)
select * from x where rid=n
we can retrieve nth max sal

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which Model uses the SET concept

937


What are the security related catalog views? : sql server security

914


How to rebuild master databse?

1032


How are the exceptions handled in sql server programming?

999


How do you delete duplicate records in sql server?

997


How to create hyperlink from returned sql query ?

1074


Can you explain about buffer cash and log cache in sql server?

907


What is sql server schema compare? How we can compare two database schemas?

962


What are triggers? How do you invoke a trigger on demand?

1246


What is order of B+tree?

1063


Define magic tables in sql server?

993


Explain different types of lock modes in sql server 2000?

885


Can you explain different types of joins?

887


When do you think a developer should use sql server-based cursors?

978


What are the properties of sub-query?

1027