Select empno, sal from emptbl where empno < 101.By this
query can we fetch first 100 recs? where empno is primary
key.It won't throw -811 error? if it wont,then what is use
of cursor technique while fetching first 100 recs.
Please need more clarification.
Answers were Sorted based on User's Feedback
Answer / kingmanish
Yes this query will fetch multiple records.
If tried to fetch these records in variables in a sql query
it will give -811 error.
In order to be able to handle these multiple records we
have to use cursor.
Now using cursor we can process each of these records one
at a time and thus cursors come handu here.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / madhu t
If the to fetch empno and sal from emptble is written in
embedded sql then it will give sqlcode -811.
yes this query fetches first 100 records of employee table.
| Is This Answer Correct ? | 3 Yes | 1 No |
How to resolve -818 sql code in DB2?
what is utility for parm lib
What is performance tuning db2?
Explain the use of the WHERE clause.
What happens to the PLAN if index used by it is dropped?
What will the FREE command do to a plan?
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
What do you mean by between and in? Is between inclusive of specified range values?
If I have a view which is a join of two or more tables, can this view be updateable?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
how to unload different table data into different gdg files/ vsam files.
Can any one tell me about Restart logic in DB2.