How You Can Define the Cursor Mode
The for update_clause defines the cursor mode. You can open a cursor in either of the following modes:
Read-only
Specifies that you can read the result table rows but not update or delete them
Update
Specifies that you can read, update, or delete rows in the result table
If you omit this clause, you can read or delete the result table rows but you cannot update them.
You can use the deferred and direct keywords to specify when updates and deletions are visible in the database. If you specify a deferred update cursor, then any updates or deletions made are not visible in the database until the cursor is closed. If you specify a direct update cursor, then any changes or deletions are visible immediately. If you do not specify one of these keywords, the default is deferred update.
If you are running under the default transaction management state (autocommit is off), you can open one deferred cursor and any number of direct update cursors and any number of read‑only cursors. If you are running with autocommit on, then you can have only one cursor open at any one time, regardless of its mode.
For more information about autocommit and transaction management, see the Programming Guide.
For more information about using cursors in OpenROAD applications, see
Fetch Statement (see
Fetch Statement) and the
Programming Guide.