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 the class forname () does?

1034


How do I view a script in sql server?

1027


How to get the definition of a trigger back?

989


What is difference between primary key and foreign key?

884


What do you mean by subquery?

1069


What is "scheduled jobs" or "scheduled tasks"?

958


How to convert a unicode strings to non-unicode strings?

1078


What is system stored procedures?

1026


What is an indice?

1017


According to you what goes into making the best database administrator? : sql server database administration

964


How to create a dynamic cursor with the dynamic option?

1023


How do I clean up sql server transaction log?

1046


What is reportserver and reportservertempdb ?

152


What is the difference between function and stored procedure in sql server?

1044


Will count(column) include columns with null values in its count?

1075