How to get Top 10 Salaries from a Table

Answer Posted / bharath

select sal from(select ename,sal rownum from emp orderby sal
desc group by sal,rownum)where topsal='&nth';

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When reorg is used?

678


What is the max length of sqlca?

769


What is deadlock in db2?

587


What is a Foreign Key?

660


What language is db2 written in?

595






What is runstats db2?

585


Why do we need reorg in db2?

566


In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?

582


What is page size in db2?

563


SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

10777


How is deadlock resolved?

650


What is sqlca?

625


How many databases can be created inside an instance in db2 ?

603


Why select is not preferred in embedded sql programs?

715


How do I import data from excel to db2?

616