select three highest values from a table.

Answer Posted / rashmiraj

SELECT COL1,COL2,ROWNUM
FROM (SELECT COL1,COL2 FROM TABLE ORDER BY COL1 DESC)
WHERE ROWNUM<=&A;

as for example........

select ename,job,sal,rownum
from (select ename,job,sal from emp order by sal desc)
where rownum <=3;

Is This Answer Correct ?    13 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define fsg ( financial statement generator) ?

535


Define about profile option?

575


What is flexfield?

501


What are the relationships I can define in a multi org environment?

474


How can I setup a child org to be its own costing organization?

519






Define descriptive flexfield ?

556


Define uses of key flexfield ?

509


What is the purpose of temp tables in interface programs?

472


Is there any documentation on how to setup an organization?

506


Explain about security attributes?

503


Define request group ?

495


Hi , I'm a Oracle Apps Technical Consultant.Looking for Functional Training on specific modules like INV,OM,PO,AP,AR,GL .Can you please let me know any trainer/institute details for the same.

964


What are cycles of gl, ap, and ar?

534


What is a token?

516


Explain the types of user exits?

493