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 / sabin v jacob

SELECT Min(Sal) FROM (SELECT TOP 2 Sal FROM emp ORDER BY
Sal desc) as Temp

or

SELECT Min(Sal) FROM emp WHERE Sal IN(SELECT TOP 2 Sal FROM
emp ORDER BY Sal DESC)

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

You want to implement the one-to-one relationship while designing tables. How would you do it?

927


Explain user defined views?

931


Can You Use A Stored Procedure To Provide Data To An Ssrs Report?

143


Describe in brief authentication modes in sql server.

987


What are triggers in ms sql server?

1126


What are the advantages of partitioning?

1066


Where sql server usernames and passwords are stored in a sql server?

950


Explain the first normal form(1nf)?

990


How to drop an existing schema in ms sql server?

1052


what is the difference between Delete and Truncate command in SQL

1102


Name three of the features managed by the surface area configuration tool? : sql server security

958


How many types of triggers are there?

1023


What is triggers and stored procedures?

914


How does clustered and non clustered index work?

866


What is the purpose of grouping data in a report?

926