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

from the table display the 2nd highest salary?
and also the least 2nd salay?

Answer Posted / smitha

2nd Highest Salary

Select top 1 salary from (select distinct top 2 salary
from employee order by salary desc)a
order by salary

2nd Least Salary

Select top 1 salary from (select distinct top 2 salary
from employee order by salary asc)a
order by salary desc

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I create a stored procedure in dbml?

1084


What are the different types of normalization?

1221


How to create a view and a stored procedure in ms sql server using "create view/procedure" statements?

1075


How to delete duplicate rows in sql server?

1156


What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas

1072


What is the difference between ddl and dml?

1101


What is shared lock?

949


Can we take the full database backup in log shipping?

998


what is a live lock? : Sql server database administration

1021


How to see existing views in ms sql server?

1114


How can delete duplicate records in cte in sql server?

1018


How to verify the port number of the sql server?

1256


what is dbcc? : Sql server database administration

1081


Do you know what is rank function?

1128


Can we use where clause with group by?

950