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 the second highest salary from emp table?

Answer Posted / naveed saleh

You can use this for getting nth highest salary from
Employee table as follows

SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP n salary
FROM employee
ORDER BY salary DESC) a
ORDER BY salary
where n > 1 (n is always greater than one)

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 drivers in mysql? : Sql dba

1018


what are the differences between char and varchar? : Sql dba

1068


How do I find sql profiler?

936


what is rollback? : Sql dba

1104


Define the select into statement.

1048


what is a trigger? : Sql dba

1024


What is minus?

988


Explain normalization and what are the advantages of it?

951


How to load data with sql*loader?

1046


How many types of privileges are available in sql?

1345


What is database migration?

963


Why do we use joins in sql?

970


Can sql function call stored procedure?

1016


What is crud sql?

977


Is left join faster than join?

1046