What is the purpose of coding FETCH in a SQL SELECT query?
Explain with an example in Detail?
Answer Posted / anandrao
FETCH will give only the number of rows equal to the number
specified with FETCH from resultset given by query.
e.g. consider ACCOUNT_MASTER table contains 100 rows.
SELECT *
FROM ACCOUNT_MASTER
FETCH FIRST 10 ROWS ONLY.
Will give only first 10 rows of ACCOUNT_MASTER table from
100 rows of ACCOUNT_MASTER table
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain about open switch business continuity software?
Why db2 is called db2?
What is a bind card?
How does a cursor work?
What is a db2 tablespace?
Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?
Comment whether dclgen is mandatorily used. If not, then what is the point of using it?
List some fields from sqlca?
Before you give the explain statement, what are the prerogatives?
What is role in db2?
List out the three types of page locks that can be held.
Outputs of explain are with matchcols = 0. What does this signify?
Why do we use cursor?
How to compare data between two tables in db2?
What is syscat in db2?