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

select a.sal from emp a
where 2=(select count(distinct b.sal) from emp b
where a.sal<= b.sal)


for getting nth max sal ..replace 2 by n


all the best

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are pessimistic lock and optimistic lock?

1142


How to create prepared statements using odbc_prepare()?

1106


What is entity data services?

1117


What are the features of Embedded SQL

1176


Explain the different types of joins?

1046


What is page-level compression?

1011


What are the restraints imposed on the table design by a merge replication?

1094


Do you know concepts and capabilities of sql server?

1115


What is the stored procedure?

1054


What do you mean by collation recursive stored procedure?

1111


If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security

1107


How can we determine what objects a user-defined function depends upon?

1076


What is a constant or literal in ms sql server?

1100


Explain about integration services of Microsoft SQL server?

1092


How do you create a data source?

962