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
What are db2 objects?
What is table space in db2?
Before you give the explain statement, what are the prerogatives?
How do I copy a table in db2?
List some fields from sqlca?
What is the physical storage length of timestamp data type?
What is the cobol picture clause of the db2 data types date, time, timestamp?
How does db2 sample database connect?
i tried to copy some records from microsoft excel to as-400 physical file through "Bosanova" emulation. Out of 14000 records only 12000 records copies and subsequently programe started to hang. Then, i closed the program forcefully. I did' under stand the problem. Also when i try to compile the physical file it is showing as "The file in use". How to overcome this problem?
How can we read records for specific member in CL? AND rpg?
What is a bind card?
Explain how can you do the explain of a dynamic sql statement?
What are packages in db2?
Explain the function done by data manager?
How to restart a DB2 program?