Understanding cursor structures
Cursor structures in PL/SQL allow the data access for a row or set of rows. Every SQL statement executed from PL/SQL is processed as a cursor. For all the SQL statements encountered by the PL/SQL engine, the Oracle server assigns a chunk of memory, privately held in SGA, for processing the statement. A cursor is a constant pointer to this work area in the memory which is also termed as context area. This context area contains the complete processing information of the SQL statement. It includes the SQL query, its parsing information, and the data set pulled out from the database tables. Even, the cursor structure captures the relevant information of the context-area activities as cursor attributes.
There are number of methods to act and access upon this work area. These methods are as follows:
Implicit cursors: Every SQL query in the executable section of a PL/SQL block is executed as an implicit cursor by Oracle. The SQL statement can be a
SELECT
statement...