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

how to find nth highest salary

Answer Posted / neeraj kumar

select top(1) Salary
from(select distinct top(n) Salary
from emp
order by Salary desc ) a
order by Salary




Note-you can find out any position salary through top(n).
n=1,2,3,4,5,6,7,8,9..................

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a large table with random data for index testing in ms sql server?

1071


Why I have to use stored procedures?

1096


What is attribute hierarchy? : sql server analysis services, ssas

1067


How many non clustered indexes there can be on table ?

962


What is similarity and difference between truncate and delete in sql?

1162


How to write an inner join with the where clause in ms sql server?

1166


What is schemabinding a view?

973


How to list all triggers in the database with sys.triggers in ms sql server?

1137


If a user does not have permission to a table, but has permission to a view created on it, will he be able to view the data in table?

981


What is the difference between executequery () and executeupdate ()?

1114


What is the command used to check locks in microsoft sql server?

1103


What is filestream?

1049


What happens to a trigger with multiple affected rows?

997


Explain ranking functions?

1099


What is inner join? Explain with an example?

1287