pavankumar.k Currently Banned New User
Joined: 21 Dec 2006 Posts: 2 Location: chennai
|
|
|
|
hai,
when we are using cursor in a prog.after we declare cursor in w.s.s we code for fetch only or for update only why do we do this.
and when we have declared cursor for fetch will the data be brought to the buffer when open the cursor or when we use select stmt,how will the data be brought |
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post this in the DB2 forum. Your code may be COBOL, but this is a DB2 questions.
When you open the cursor, the set of matching rows will be retrieved/ordered. When you issue the fetch, one row at a time will be returned to your program.
If your program is only going to read rows, do NOT specify update. Systems that read rows for update when it is not needed often have performance problems. Tasks have to wait for locked rows that would have been available. |
|