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 the cascade rule and how does it relate to deletions made with a subselect?
What is a recovery log?
What is runstats utility in db2?
How can the duplicate values be eliminated from db2 select?
what happend with out using Commit,when closing cursor and program?
Can one database have multiple instances?
can all users have the privilage to use the sql statement select * (dml)?
How to update more then one record using update?
What does a deadlock mean in DB2?
Why do chiropractors use drop table?
What is a cursor and what is its function?
How do you stop a db2 database in linux?