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

What is a collection?

3 Answers  


What is difference between alias and synonym in db2?

0 Answers  


Can DB2 be accessed by TSO users? If yes, which command is used to invoke DB2?

1 Answers  


can you use symbolic parameters in JOB?

5 Answers   IBM,


How do you do the EXPLAIN of a dynamic SQL statement?

2 Answers  






How do I add a column to an existing table in db2?

0 Answers  


Can you access the DB2 Directory table using SQL?

3 Answers  


Why use RUNSTAT Utility?

3 Answers   Merrill Lynch,


How is the value function used?

0 Answers  


What should be specified along with a cursor in order to continue updating process after commit?

1 Answers   IBM,


Can any one tell me about Restart logic in DB2.

2 Answers  


What are the three lock types?

2 Answers  


Categories