Cursor variables
Cursor variables provide a unique service to refer to different context areas in SGA as they can be associated to more than one SELECT
statement in the same block. While static cursors remain stuck to a single static SELECT
, cursor variables purely act like a pointer variable. At runtime, the pointer can be moved to point to different work areas having different SELECT
statements and hence, different result sets.
By virtue of their behavior, a cursor variable differs from a static cursor. Static cursors have the life cycle of only one SQL processing, but cursor variables can live for many SQL statements. Once the processing under a work area is finished, they are ready to move on and point to a different work area. Cursors cannot ...
Get Oracle Advanced PL/SQL Developer Professional Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.