Page 1 of 1

when a cursor is opened.. when a new row is insert into tabl

PostPosted: Thu Jan 28, 2010 11:18 am
by pradeepgowda
during runtime, when a cursor is opened.. when a new row is inserted into the base table, that satisfies the condition in select clause of declare cursor.. will that row be included in the result table after open cursor statement..

ie consider a table employee
employid name
1152 pradeep
1162 gowda

exec sql
declare c2 cursor for select employeeid, name from employee
end-exec
at runtime, when a cursor is openend ,if a new row is added

1175 bob

will the new row be selected for the result table

Re: when a cursor is opened.. when a new row is insert into tabl

PostPosted: Fri Jan 29, 2010 12:44 am
by dick scherrer
Hello,

will that row be included in the result table after open cursor statement..
Possibly. . .

If the cursor fetches rows directly from the database table, newly inserted rows can be retrieved during the process. If the cursor fetches rows from a temporary result table, new inserts will not be retrieved.

This can also happen with updates that cause the row to be "found later". . .

Suggest you talk with your dba about your specifics.