Oracle creates a memory area for processing an SQL statement, which contains all information needed for processing the statement.
A cursor is a pointer to this memory area. PL/SQL controls the memory area through a cursor. A cursor holds the rows (one or more)
returned by a SQL statement.
There are two types of cursors:
Implicit cursors
Explicit cursors
Implicit Cursor:
=================
Implicit cursors are automatically created by Oracle whenever DML operations are performed,
Programmers cannot control the implicit cursors and the information in it.
Whenever a DML statement (INSERT, UPDATE and DELETE) is issued, an implicit cursor is associated with this statement.
For INSERT operations, the cursor holds the data that needs to be inserted.
For UPDATE and DELETE operations, the cursor identifies the rows that would be affected.
Explicit cursors:
==================
Explicit cursors are programmer defined cursors for gaining more control over the memory area.
An explicit cursor should be defined in the declaration section of the PL/SQL Block.
It is created on a SELECT Statement which returns more than one row.
A cursor is a pointer to this memory area. PL/SQL controls the memory area through a cursor. A cursor holds the rows (one or more)
returned by a SQL statement.
There are two types of cursors:
Implicit cursors
Explicit cursors
Implicit Cursor:
=================
Implicit cursors are automatically created by Oracle whenever DML operations are performed,
Programmers cannot control the implicit cursors and the information in it.
Whenever a DML statement (INSERT, UPDATE and DELETE) is issued, an implicit cursor is associated with this statement.
For INSERT operations, the cursor holds the data that needs to be inserted.
For UPDATE and DELETE operations, the cursor identifies the rows that would be affected.
Explicit cursors:
==================
Explicit cursors are programmer defined cursors for gaining more control over the memory area.
An explicit cursor should be defined in the declaration section of the PL/SQL Block.
It is created on a SELECT Statement which returns more than one row.
Comments
Post a Comment