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

Can a synonym name of a table be used instead of a table name in a select statement?

1040


How to enforce security in sql server? : sql server security

1112


what is the primary use of the model database? : Sql server administration

1054


Can sql servers link to other servers like oracle?

847


How to manipulate data from one table to another table ?

973


Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?

1029


which backup strategy you are following at ur company

2149


How to add the custom code in Report?

129


What is cdc in sql server?

1006


What are the three different part of rdl file explain them?

269


How to get all stored procedures in sql server?

1003


How many tables can be joined in SQL Server?

1069


How do I find the size of a sql server database?

931


What gets stored inside msdb database?

1255


What are the new features in sql server 2016?

973