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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of reorg in db2?

600


What is db2 bind?

636


What is reorg and runstats in db2?

689


what is a corelated subquerry?

654


What is view db2?

622






What is page size in db2?

560


What is consistency token in db2?

638


What is ibm db2 connect?

570


How is the value function used?

600


What is load replace in db2?

560


run jcl for cobol+db2 pgm?.. //jobcard //step001 exec pgm=ikjeft01 //systin dd * DSNSYSTEM(--------) RUN PROGRAM(MYPGMNAME) PLAN(-----), LIB(-------), PARMS(------) /* WHAT WILL U GIVE INSIDE THE BRACKETS... WHAT IS PLAN,PACKAGE,BIND?..PLAN N PACAKGES ARE GENERATED BY ?...

3787


What types of tables are there in the db2 database?

548


Is db2 free?

683


My sql statement select avg(salary) from emp yields inaccurate results. Why?

639


What are the bind parameters ibm db2?

622