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

I Have Employee table having column name as ID,SALARY
how to get second max salary from employee table with id
ex
ID SALARY
1 20000
7 37000
2 5000

Answer Posted / sudip mondal

select top 1 from employee where ID in (select top2 ID from
employee order by Salary desc) order by Salary asc

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to create trigger on views?

1030


How do you send email on SQL Server?

1116


How to use old values to define new values in update statements in ms sql server?

1331


What are subqueries in sql server? Explain its properties.

1072


what are constraints? Explain different types of constraints? : Sql server database administration

1049


How is sql used in sql server?

1058


What are the advantages of sql azure?

140


What are the advantages of log shipping?

1039


Write a program using SQL queries to find a unique entry in a table.

1045


Explain the various types of concurrency problem?

1241


What are database states in ms sql server?

1245


What is extent? Types of extents?

1276


What is the difference between writing data to mirrored drives versus raid5 drives

988


What is the difference between an index and a unique index?

1046


What is an entity-relationship diagram (erd)?

1311