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

select the 3rd maximum salary from sql server database if 4
(just an example In practically I may not know the exact
situation) of the highest salaries are equal.

Answer Posted / kiran

select empid,salary
from (select distinct empid,salary,
Dense_Rank() over(order by salary desc) as Rank
from dbo.EmpSalary) b
where b.rank=3

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between NOROW and LOCKROW?

2826


How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?

2579


What is sql server used for?

1037


Explain view in sql server?

1050


How can you start sql server in different modes?

962


What is difference between order by and group by?

999


How do you size a resultset?

908


Explain log shipping and mention its advantages.

1035


What is linked report?

131


How to use subqueries with the in operators in ms sql server?

1065


Define Wed Edition in SQL Azure?

100


How do you troubleshoot errors in a SQL Server Agent Job?

1047


Why we use the openxml clause?

1001


Explain subquery and state its properties?

1034


Can another user execute your local temporary stored procedures?

975