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...

find out the second highest salary?

Answer Posted / hari kanth

select sal from(select sal,rank() over(order by sal desc)
rnk from emp) e
where e.rnk=2;
(OR)
select rownum,sal from emp group by sal,rownum
having rownum=2;
(OR)
select rn,sal from( select rownum rn,sal from emp group by
sal,rownum order by sal desc)
where rn=2;

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use subqueries in the from clause in oracle?

1048


How to connect asp pages to oracle servers?

1007


How can I see all tables in oracle?

951


 How to use an oracle sequence generator in a mapping?

1021


How do I find my oracle client driver version?

975


What is oracle rownum?

890


Oracle

2321


How to create a stored function in oracle?

1040


What is private procedure oracle?

958


What is the parameter mode that can be passed to a procedure?

983


various types of hints and their usage

2627


Explain the different normalization forms?

1014


Is oracle the best database?

918


How to best split csv strings in oracle 9i?

986


Please explain drop constraint oracle?

1030