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
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 |
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 |
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 |
What is buffer pool?
Are views updateable?
Do we have any optinon to search part of integer in DB2 as we have for character Like,SUBSTR optins?
how to check the table is empty or not?
What is a host variable?
Where would you find information about the type of database authority held by the user?
wht happens if we close cursor with cursor with hold option?
What is ibm db2 client?
What is the cascade rule and how does it relate to deletions made with a subselect?
How do I add a column to a table in db2?
Mention the location where the output received from explain statement is stored.
Can a Db2 table data be retrived through JCL?