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 is pls_integer in pl sql?

1100


How exception handling is done in advance pl/sql?

979


What is the importance of sqlcode and sqlerrm?

1347


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

1143


Is there a way to automate sql execution from the command-line, batch job or shell script?

968


Write a sql query to find the names of employees that begin with ‘a’?

1008


What is sql performance tuning?

913


Describe sql comments?

1029


How do I view a table in sql?

1002


What is sql profiling in oracle?

1057


Is it possible to pass parameters to triggers?

1099


Does sql*plus also have a pl/sql engine?

1074


Is oracle sql free?

979


Which certification is best for sql?

981


What is autocommit sql?

981