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 / ramesh lavanuru

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 ?    52 Yes 63 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are indexes and views important to an organization?

950


how does a local variable is defined using t-sql? : Transact sql

1001


How do I find duplicates in a single column in sql?

1015


How does one use sql*loader to load images, sound clips and documents? : aql loader

1181


What does pl sql developer do?

922


what is the use of set statement in tsql? : Transact sql

1007


Can a varchar be a primary key?

1007


How many subqueries can be nested in a statement?

980


How do I view a view in sql?

948


What is orm in sql?

1041


explain the options of myisamchk to improve the performance of a table. : Sql dba

1005


Explain the uses of database trigger.

1112


Which command is used to call a stored procedure?

994


How many commands are in sql?

1066


What does subquery mean in sql?

1046