Cursor Actions
Key actions involved in working with cursors in PL/SQL are:
- Declare Cursor: A cursor is declared by defining the SQL statement that returns a result set.
- Open: A Cursor is opened and populated by executing the SQL statement defined by the cursor.
- Fetch: When the cursor is opened, rows can be fetched from the cursor one by one or in a block to perform data manipulation.
- Close: After data manipulation, close the cursor explicitly.
- Deallocate: Finally, delete the cursor definition and release all the system resources associated with the cursor.
Cursors in PL/SQL
A Cursor in PL/SQL is a pointer to a context area that stores the result set of a query.