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 / p rem satyam

This is perfect
...............................

select * from emp e1 where (N-1)=( select
count(distinct(e2.sal) from emp e2 where e2.sal > e1.sal)

where N is level of sal. suppose you want 3rd higest sal then
in place u write 3 i.e write (3-1).

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to add the custom code in Report?

129


How do I find information about the install locations for the various instances running on a computer?

1126


How to set database to be read_only in ms sql server?

1054


How many levels of sp nesting are possible?

1070


What are the five major components of a dbms?

962


What does it mean if @@cursor_row returns a negative number?

1040


What is difference between clustered and non clustered index?

1035


Explain filtered indexes benefits?

1046


How we create SQL Server 2005 Reporting Services ? Give me Sample

2045


Where sql server usernames and passwords are stored in a sql server?

1038


Explain what is analysis service repository?

1050


List down some advantages of sql stored procedure?

1016


What is the difference between osql and query analyzer?

1048


Do you know what is xpath?

1155


How many types of schemas are there?

1094