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 calcuate the second highest salary of he employee

Answer Posted / jitendra

To get nth highest Salary, use below query

SELECT TOP 1 salary
FROM (
SELECT TOP nth salary
FROM Emp
ORDER BY salary DESC
) TmpTable
ORDER BY salary ASC

Replace nth with your number like second highest=2 4th=4 etc

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can dml statements be used in pl/sql?

1021


What is clustered and nonclustered index in sql?

896


what is offset-fetch filter in tsql? : Transact sql

893


What are sql functions? Describe in brief different types of sql functions?

1013


How do I run a script in sql developer?

901


What is pl sql commands?

983


How many types of triggers are there in pl sql?

1016


Which is the correct statement about truncate and delete?

1037


Is full outer join same as cross join?

915


What are aggregate functions in sql?

1090


List different type of expressions with the example.

896


What are all the different normalizations?

972


What is dialect in sql?

890


How would you reference column values before and after you have inserted and deleted triggers?

1021


How many sql statements are used?

965