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 / ayush sharma

select sal from (select distinct sal from emp order by desc)
where rownum <=n minus select sal from(select distinct sal
from emp order by desc) where rownum<=n-1;

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?

1690


Explain stored procedure?

1110


Name few of the dcl commands in sql?

1057


Tell me what is log shipping?

1033


Why are you getting errors when creating a new odbc dsn?

1292


What are the main differences between #temp tables and @table variables and which one is preferred?

1135


What is sql stored procedure?

1150


Where are sql server user names and passwords stored in sql server?

1156


Why does sql studio use a single registered database repository? : sql server management studio

1041


What is the maximum row of a size?

1071


How to add additional conditions in SQL?

1069


Write a sql query to get zero records from a table having n number of records?

1235


When you should use a low fill factor?

1040


what exactly sql injuction.how to overcome.....

2597


What is triggers in ms sql server?

1183