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 do I delete a table in database?
What is reorg and runstats in db2?
What is a NULL value? What are the pros and cons of using NULLS?
What is scrollable cursor in db2?
what are the copybook changes generally we done?can anyone tell me......... Thanks in advance........
What are the various data types available in db2?
What is schema in db2?
my project is insurance management system,how to explain my work environment in interview?
What do you mean by commit and rollback?
What is EXPLAIN?
Explain the function done by data manager?
How do I add a column to an existing table in db2?