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 retrieve 5th highest sal from emp table?

Answer Posted / venkata

hi, earlier query return sal in asending order and when
duplicate salries are there the earlier highest salary
position returns no rows. I hope this is better query.


select * from (select * from emp order by sal desc)
group by
rownum,empno,ename,job,mgr,hiredate,sal,comm,deptno having
rownum=&n

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is analyze command used for?

1126


State the various uses of dbcc command?

1110


How to write a query with a right outer join in oracle?

1224


What happens to indexes if you drop a table?

1224


What is user managed backup in Oracle?

1206


Explain mutating triggers.

1088


What is the usage of merge statement?

1204


What is concurrency in oracle?

1059


What do you mean by redo log file mirroring?

1071


How to find the duplicate rows count from employees table in oracle?

1148


What is not equal to in oracle?

1049


How does the on-delete-cascade statement work?

1163


Compare and contrast between sql and sql server and explain its various functions?

1019


What happens if you set the sga too low in oracle?

1223


What is flashback in Oracle?

1063