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

What is the difference between "as" and "is" in an oracle stored procedure?

1000


What are the tools for Oracle ?

1073


Can you drop an index associated with a unique or primary key constraint?

1026


How to start instance with a minimal initialization parameter file?

1049


How to rename an index in oracle?

1121


How to name query output columns in oracle?

1193


What happens if recursive calls get out of control?

1085


How to create a single index for multiple columns?

1044


Difference between cartesian join and cross join?

1056


Explain the use of full option in exp command.

1120


Hi friends can u send the oracle 9i full version download link?????????????? please reply ?

1870


What is SQL access advisor in Oracle?

1200


How to add another datafile to a tablespace?

1047


What is merge statement used for?

1032


What is BBED in Oracle?

1165