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 / bennison terry

Select Top 1 * from Tbl_Salary where ID not in (Select top 1 ID from tbl_salary order by salary desc) order by Id desc

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is self contained scalar sub query?

1014


What is the federation in sql azure?

97


What is attribute relationships, why we need it? : sql server analysis services, ssas

1027


How to use "if ... Else if ... Else ..." Statement structures in ms sql server?

1139


What is analysis service repository?

1066


Explain about integration services of Microsoft SQL server?

1082


What is forward - only cursors / read only cursor?

1129


What is difference between getdate and sysdatetime in sql server 2008?

1097


how do you test proper tcp/ip configuration windows machine? : Sql server database administration

1112


Why union all is faster than union?

976


Define tool Manage Statistics in SQL Server 2000 query ?

1164


What do you understand by a view? What does the with check option clause for a view do?

1054


Explain different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?

1083


What are clustered and non-clustered index?

1049


What it means to be triggered?

1076