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 |
Can we use select query in a loop to fetch multiple rows in a COBOL PROGRAM? If so, what is the advantage of cursor?
What does it mean if the null indicator has -1, 0, -2?
What is the physical storage length of date data type?
Can one database have multiple instances?
How do I delete a table in database?
How to resolve -504 sql code in DB2?
What statistic will tell the DBA how must space can be reclaimed from dropped table spaces on the next reorg run?
What is rct?
What is tablespace?
Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.
Define db2 and its databases?
What are the uses of db2 optimizer?