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

how to find nth highest salary

Answer Posted / bharath

select distinct(sal) from emp a where 3 = (select
count(distinct(sal)) from emp b where a.sal<= b.sal)

replace 3 by 2 for second highest...

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are defaults? Is there a column to which a default can't be bound? : Sql server database administration

1139


What is b tree index?

915


What are the steps to follow to configure SQL*Net?

1044


What the different components of Replication and what is their use?

1070


What different steps will a sql server developer take to secure sql server?

998


What is the Difference Between Primary and Foreign Key?

1006


What is acid properties?

1100


Do you know what is a with(nolock)?

1058


How to use values from other tables in update statements in ms sql server?

1118


What is dynamic cursor in SQL SERVER?

1082


Explain the phases a transaction has to undergo?

1057


How should i optimize the time for execution of stored procedure having single input and many output from the different tables?

1916


what are the important architecture components of SSRS?

140


Name few of the dcl commands in sql?

1007


What is index fragmentation in ms sql server?

1086