Fetching and updating cursors

In future versions, the DBAPI-compliant return value may be implemented, but for now the function returns None. This is then made available through the standard Fetch the next set of rows of a query result, returning a list of tuples.

fetching and updating cursors-29fetching and updating cursors-25

Oracle creates a memory area, known as the context area, for processing an SQL statement, which contains all the information needed for processing the statement; for example, the number of rows processed, etc. The set of rows the cursor holds is referred to as the active set.

method: they are bound to the connection for the entire lifetime and all the commands are executed in the context of the database session wrapped by the connection.

Cursors created from the same connection are not isolated, i.e., any changes done to the database by a cursor are immediately visible by the other cursors.

You can name a cursor so that it could be referred to in a program to fetch and process the rows returned by the SQL statement, one at a time.

There are two types of cursors − Implicit cursors are automatically created by Oracle whenever an SQL statement is executed, when there is no explicit cursor for the statement.

Leave a Reply