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 only %th Highest Sal

Answer Posted / abhishekjaiswal

SELECT A.FIRST_NAME,
       A.SALARY
   FROM EMPLOYEES A
   WHERE 3 = ( SELECT COUNT(*) -- Replace 3 with any value of (N - 1)
               FROM EMPLOYEES B
               WHERE B.SALARY > A.SALARY)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the different type of sql's statements ? : Sql dba

874


Can we join more than 2 tables in sql?

950


what is the stuff function and how does it differ from the replace function? : Sql dba

992


How do you run a query?

958


what is a materialized view? : Sql dba

999


What is difference between procedure and trigger?

919


Explain two easy sql optimizations.

962


How do I kill a query in postgresql?

1014


Do foreign keys improve performance?

968


Explain the uses of control file.

994


What are the three forms of normalization?

996


What is the command used to fetch first 5 characters of the string?

1336


what is sql profiler? : Sql dba

997


Is left join faster than join?

985


What is mutating table error?

1118