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 / mohammed irfan

SELECT sal1 "salary"
FROM (SELECT ROWNUM rownum1 ,sal1
FROM (SELECT sal sal1
FROM emp
ORDER BY sal DESC
)
)
WHERE rownum1=:p_highest;

Note:- 'p_highest' here we can give the number as we want
to display the highest salary.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are myisam tables? : Sql dba

1042


how are mysql timestamps seen to a user? : Sql dba

1147


What is normalization sql?

1066


What does an inner join do?

1196


what is clause? : Sql dba

1067


What are stuff and replace function?

1091


What does stand for in sql?

980


How do I audit the sql sent to the server?

1017


Why do we use sql constraints?

1179


What is latest version of sql?

1052


What are inbuilt functions in sql?

1071


Why sql query is slow?

1006


What is offset and limit in sql?

1068


What are the commands used in sql?

1087


Is sql pronounced sequel or sql?

1279