Types of Cursors:
PL/SQL implicitly declares a cursor for all SQL data manipulation statements, involving queries which return only one row. Cursors can be classified into 2 types.
- Implicit Cursors
- Explicit Cursors
Implicit Cursors:
When a SQL statement is issued the Database server opens an area of memory in that the command is executed and parsed. This area is known as a cursor. When the executable category of PL/SQL block issues a SQL command the PL/SQL creates an implicit cursor that has the identifier SQL. PL/SQL will manage this cursor.
Explicit cursors:
SELECT statements which will occur in the PL/SQL blocks are called embedded. They must return one row and might only return one row. To obtain around this a SELECT statement is describe as a cursor (an area of memory) the query is executed and the returned rows are manipulated within the cursor. An Explicit Cursors could be classified into two types.
- Static Cursors
- Dynamic Cursors