wht happens if we close cursor with cursor with hold option?

Answer Posted / ratheesh nellikkal

Once u issued a close cursor statement , it will get closed.
You can not access it after that until u open it again.
In that case your procedure will exit with an error message
like
"SQL0501N The cursor specified in a FETCH or CLOSE
statement is not open. SQLSTATE=24501"

With hold option doesn't make any difference in this case.


But if you are doing a commint operation in between your
transactions then a cursor declared with 'with hold' option
will not get closed.

Is This Answer Correct ?    23 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of value function?

729


How do I create a view in db2?

694


what is db2 restart?

1780


What is db2 look?

669


What is the use of reorg in db2?

699






what is diffrence b/w file-aid tool and file-aid utility???

4331


What is scrollable cursor in db2?

691


What is explain plan in db2?

675


What is alias in db2?

680


What is the syntax for FETCH in DB2 ?

769


What kind of database is db2?

662


How would you find out the total number of rows in a db2 table?

668


Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?

2784


What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?

826


How connect db2 database to datastage?

866