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

write query for fourth maximum salary from employee table

Answer Posted / santhosh

;with result as
(
--use dense_rank instead of row_number or rank
select salary, DENSE_RANK() over (order by salary desc) as denserank
from Employees
)
select top 1 * from result
where denserank = 4

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a code to select distinct records without using the DISTINCT keyword.

1070


Which sql server is best?

967


What are different types of collation sensitivity?

961


How to list all user defined functions in the current database?

997


What is trigger in salesforce?

922


What function does a database engine serve in the sql server?

1004


Explain the microsoft sql server delete command? : SQL Server Architecture

1031


What are the different types of columns types constraints in the sql server?

1034


What is an example of a primary key?

932


What is the security principal at the server level that represents your session?

982


What are some of the pros and cons of not dropping the sql server builtinadministrators group? : sql server security

952


How to drop an existing stored procedure in ms sql server?

988


Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture

1012


What is 3nf normalization?

938


What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?

920