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 difference between random and sequence file access
What is subquery ?
ther r 2 tables OTTABLE & SALTABLE, add the otamt from OTTABLE to empsal of SALTABLE if eid is matched else add the unmatched from OTTABLE to SALTABLE
What is a db2 schema?
What is a db2 collection?
What is phantom read in db2?
What is filter factor?
DB2 is a A) data base/data communication system B) data base C) RDBMS D) Programming language
What os does db2 run on?
What is ibm db2 client?
assume ther are 5000 records in a database and want to fetch using cursor. cursor fetches only 3000 records and fetch is not happening for remaining 2000 records. why it happens and how to rectify it
How would you print the output of an SQL statement from SPUFI?