i have table agdet i want first 5 maximum commission which
query will you write for this thanks in advance

Answers were Sorted based on User's Feedback



i have table agdet i want first 5 maximum commission which query will you write for this thanks in..

Answer / yuvaevergreen

exec sql
select commission from agdet order by commission desc
fetch first 5 rows only
end-exec;

Is This Answer Correct ?    10 Yes 0 No

i have table agdet i want first 5 maximum commission which query will you write for this thanks in..

Answer / girish

select * from agdet a where 5 >= (select commission from
agdet a , agdet b where b.commission > = a. commission)with
ur;

Is This Answer Correct ?    0 Yes 3 No

i have table agdet i want first 5 maximum commission which query will you write for this thanks in..

Answer / thiru

select * from agdet order by commission fetch first 5 rows
only for read only with ur

Is This Answer Correct ?    3 Yes 7 No

Post New Answer

More DB2 Interview Questions

Can you access the DB2 Directory table using SQL?

3 Answers  


How to get Top 10 Salaries from a Table

11 Answers   Accenture, HTC,


when i am trying to update a table having 1000 rows. the program abends.how we will come to know the last successful updated row was. we are not using any commit operations

3 Answers   IBM,


I am having n number of records in a table which consists of emp-name is one of the field among them. Now i want to change the first letter of every name with capital.

1 Answers   Cap Gemini,


in my table i will update only 100 record among 1000 records i need to display recently updated record'.....can u tell me where those records are stored how can i display those records...?if there is any sql query pls let me know....?

3 Answers   Infosys,






OUTER JOINS USED TO GET MATCHING AND NONMATCHING ROWS FORM 2 OR MORE TABLES BASED ON COLUMNS. SIMPLE JOINS ALSO DO THE SAME THEN WHAT IS THE USE OF OUTER JOINS.

1 Answers   Syntel,


How is deadlock resolved?

0 Answers  


How would the varchar column remarks defined?

0 Answers  


What is package in cobol db2?

0 Answers  


can we view the access paths created by dbrm ? how ? thx

2 Answers   IBM,


What type of database is db2?

0 Answers  


the dd name for ksds is dest1 and what is the dd name for alternate index of ksds ? a.dest b.dest1 c.dest1a d.dd1

2 Answers   Logica CMG,


Categories