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 |
Describe major components of db2?
In my table having 100 Rec. How can I delete the 7th row?? (we don't know what is data inside the table)
How do you run JCL in cobol program
Can a primary key have null values? If we try to insert a null value in a primary key column, will it work or give an error code?
What is a DB2 catalog?
How does cobol compile db2 program?
how to resolve -805 . how to see dbrm and package not found
How does DB2 use multiple table indexes?
Explain about rct.
How many sub queries can you combine together ?
How can you display the current date & current time ?
What is cursor?