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

How do you explain an index number?

1114


what is the functionality of the function htmlentities? : Sql dba

971


What is use of package in pl sql?

1019


What is a unique key and primary key and foreign key?

969


Which query operators in sql is used for pattern matching?

972


What is the current version of sql?

1028


what is table? : Sql dba

1069


How do I run a program in pl sql?

1008


What language is oracle sql developer?

1024


What does cursor do in sql?

1031


what are date and time data types in mysql? : Sql dba

977


What is data control language (dcl)?

1147


Is left join faster than inner join?

1130


Why do we need cursors in pl sql?

1091


What are the disadvantages of file system?

1271