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

Can you roll back the ddl statement in a trigger?

982


What is difference between oltp and olap?

1056


What are the types of joins in sql?

1131


How to check table values in sql server?

959


Why do we use sql limitations? Which constraints can we use while making a database in sql?

1082


What is parameterized reports in ssrs ?

150


What is resource governor in sql server?

1007


Which are the new data types introduced in sql server 2008?

887


How to copy data from one table to another table?

999


What is data modeling and Reterminal integrity?

1959


What is difference between index and primary key?

1103


Tell me about the approaches which you used to counter the DI problems.

1357


List out the different types of locks available in sql server?

981


What is merge statement?

1086


What are the properties of the transaction?

1006