RE: Cursor

From: Ganesan Ramanathan <ganesan.ramanathan_at_octel.com>
Date: 1996/05/28
Message-ID: <01bb4cf0.ff1be1e0$b9349394_at_nb-gramanat.corp.octel.com>#1/1


On Thursday, May 23, 1996, AravindBR wrote...
> In an explicitly declared cursor is it possible to move to the previous
> row ?

NO. But we can do, only if fetch the records and manipulate them locally. ( e.g.,'C' arrays)
>
> Is active set generated by OPENing an explicitly declared cursor
> dynamic. i.e. I declare a cursor and OPEN it, at the same time some
> other user modifies and COMMITs the data in the base table. Will the
> modified data be reflected in the cursor FETCH statements.
>

No. The explicit cursor is not dynamic. Oracle cursors have been defined in such a way that, when the cursor is opened, the SQL is executed and the records are fetched into the buffers. The FETCH is only fetching the data from the buffer. So you will not able to see the modifications made by another user after the Open cursor statement.

However you can use select for update statements, in order to avoid such those situations.

Hope it helps,

Ganesan Ram. Received on Tue May 28 1996 - 00:00:00 CEST

Original text of this message