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 |
What keyword does an SQL SELECT statement use for a string search?
What is the syntax for FETCH in DB2 ?
how will i display the duplicate record's from a table... i don't want to eliminate ...i want to display the duplicate record...for example in my table i have 10 record's like record no(1,2,3,4,2,9,6,1) in this ...so i want to receive duplicates...
B37 abend during spufi?
What is the purpose of the SDSNLOAD dataset in the STEPLIB while running DB2 programs?
wht r the requirements for writing a cobol-db2 pgm ?
what is difference between Plan and Package
wht happens if we close cursor with cursor with hold option?
How to handle null values in db2
what is Static and dynamic linking
5 rows are inserted to a DB2 Table. Next 3 of those are updated, then a rollback is issued. What would happen when the rollback is issued?
What is alias in db2?