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 set – of books?

570


What is data migration?

488


What is oracle apps (erp)?

516


What is a token?

507


Define multi org ?

518






Can you use concurrent program "gather schema statistics" to gather stats on sys schema in oracle apps?

501


What is the role of document manager?

496


Define template?

518


Differentiate apps schema from other schemas?

545


What is mrc?

512


What is flexfield? And types of flexfields?

521


How to register concurrent program with oracle apps?

472


Define autonomous transaction?

507


Is there any documentation on how to setup an organization?

502


What is the concurrent program?

530