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

Can you tell me how can you find out the # of rows updated after an update statement?

612


Is the primary key a clustered index?

611


How connect db2 database to datastage?

765


How is a typical db2 batch pgm executed?

642


Explain about rct in db2?

640






Explain how can you do the explain of a dynamic sql statement?

654


Who uses db2?

576


If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?

705


What are the various data types available in db2?

632


What is a page in db2?

610


What is the purpose of using commit?

618


How can you do the explain of a dynamic sql statement?

637


What is meant by explain?

662


What is a cursor in programming?

594


How would you find out the total number of rows in a db2 table?

579