Cursor is a pointer to a PRIVATE work area , which contains data or information retrieved with SQL statements( a dataset encapsulated within a system defined memory space) . Cursors are automatically generated by Oracle utilities like SQL*Plus. |
Oracle Holds SQL statements in a SHARED SQL AREA.Please refer to
this document,
dynviews_2108.htm , for the details about the SQL SHARED MEMORY used
with CURSOR.
There are four steps to rollup a cursor, DECLARE, OPEN, FETCH AND CLOSE the cursors. |
An Implicit cursor is the one, which is created "automatically" as
one query is executed. An implicit cursor is generated de novo with a
DML statement with INSERT, UPDATE OR DELETE clauses. The most
recent implicit cursors can be handled with 5FOUND, %ISOPEN, %NOTFOUND
and %ROWFOUND . An explicit cursor is created by the user by writing
codes with PL/SQL
Explicit cursor tender more dynamic and manageable programmatically . A demo PL/SQL Cursor Script:
|
I shall post some examples, later , in this series of documents. |
Note: I would like to add few lines about retrieving Cursor variables into a Visual Studio Recordset; scope of OLE-DB is huge at this juncture. |