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 / elumalai.k

select top1 id,salary from employee
where
(salary<(select max (salary) As sal from employee As Empp))
orderby salary desc.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is standby servers? Explain types of standby servers.

1052


How many database files are there in sql server 2000?what are they?

1107


What is the difference between Triggers and Stored Procedure?

1155


Explain the Ways to improve the performance of a sql azure database?

84


What are the steps to insert a table?

991


Explain different backup plans?

1005


What is history table in sql server?

1028


Explain the benefits of user-defined functions?

1122


How you trouble shoot when any job fails

1981


What are the different types of sub-queries?

1087


Tell about MOM Tool(Microsoft Operator Manager)?

1959


What do you mean by a Composite primary key?

1187


Working with TLogs

1895


How can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role?

1081


How do I start sql server?

1030