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

Define magic tables in sql server?

1124


What samples and sample databases are provided by microsoft?

1089


How to insert new line characters into strings?

1034


What is the use of @@spid?

1055


How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?

2054


How to add an address record into adventureworkslt?

1030


Do you know query execution plan?

1271


What is a result set object returned by mssql_query()?

1233


Explain following error properties?

1068


Does index slows down insert statements?

1049


Why main is user defined function?

1052


what is the system function to get the current user's user id? : Sql server database administration

1077


How can you insert null values in a column while inserting the data?

1347


What is SQL Azure?

107


Do you know what is normalization of database? What are its benefits?

1210