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 / sunil nair

SELECT EmpID,Salary from tblSalary a where 3=(select count
(distinct EmpID) from tblSalary b where b.empid>=a.empid)

For any database

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to resolve the orphan use problem? : sql server security

1010


Does the order of columns in update statements matter?

909


What is difference between primary key and foreign key?

893


how many layers of tcp/ip protocol combined of? : Sql server database administration

990


What is wrong with sql server client libarary dll, ntwdblib.dll?

1033


How to count rows with the count(*) function in ms sql server?

1006


Explain about Joins?

981


Where actually sql azure database is hosted?

163


How would we use distinct statement? What is its use?

1065


What is database isolation in sql server? : sql server database administration

1094


How to test a dml trigger in ms sql server?

1036


What is inner join in sql server joins?

1027


What is clustered vs nonclustered index?

936


How to create new tables with "create table" statements in ms sql server?

1053


Can you please explain the difference between primary keys and foreign keys?

1099