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

Explain what are the advantages of views?

1107


What is meant by raw datatype?

1118


What do you mean by a deadlock?

1109


What are a cluster and non-cluster index?

1064


What are the uses of Database Trigger ?

1786


What is the difference between sharding and partitioning?

1039


what's query optimization and without use of IN AND Exist can we get another way data from query

2200


What are the differences between char and varchar2 in oracle?

1246


what are bitmap indexes? How does they work?

2303


Explain the difference between a procedure and a function?

1240


What privilege is needed for a user to query tables in another schema?

1031


How to shutdown your 10g xe server from command line?

1152


How to define a sub function?

1200


How to load a large xml file?

1106


How to convert characters to times in oracle?

1070