How to get Top 10 Salaries from a Table

Answer Posted / shammi

SELECT *
FROM (select * from employee ORDER BY salary desc) employee2
WHERE rownum <= 10
ORDER BY rownum;

correct me if am wrong

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Before you give the explain statement, what are the prerogatives?

581


What is nvl in db2?

628


Define check constraint.

645


What is an instance in db2?

564


Following a db2 update statement, what is the quickest way to compute the total number of updated rows?

625






What is the picture clause of null indicator variable?

692


What are the full forms of spufi and dclgen and why are they used?

657


What are union and union all?

541


Why do chiropractors use drop table?

662


in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?

1628


What is runstats utility in db2?

569


How can you count the number of rows from a table tab?

638


List out the buffer pools in db2

632


Is ibm db2 free?

576


Mention data types used in db2 ?

680