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

Delete duplicate rows without using rowid.

1527


What is report server project?

145


What is 1nf 2nf and 3nf?

877


What is a group function explain with an example?

971


Explain the phases a transaction has to undergo?

1032


Explain the dbcc pintable command when would you use it?

894


How to update values in a table with update statements in ms sql server?

988


What are trace flags?

1010


How to delete an existing database user?

1001


Are all views updatable ?

1135


What is the default schema of your login session in ms sql server?

1029


Do you know what are acid properties of transaction?

941


What are user-defined functions (udfs) in sql server?

971


Explain “row_number()” in sql server with an example?

984


What is the current pricing model of SQL Azure?

104