Cursor Actions

Key actions involved in working with cursors in PL/SQL are:

  1. Declare Cursor: A cursor is declared by defining the SQL statement that returns a result set.
  2. Open: A Cursor is opened and populated by executing the SQL statement defined by the cursor.
  3. Fetch: When the cursor is opened, rows can be fetched from the cursor one by one or in a block to perform data manipulation.
  4. Close: After data manipulation, close the cursor explicitly.
  5. 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.

Similar Reads

PL/SQL Cursors

The cursor is used to retrieve data one row at a time from the results set, unlike other SQL commands that operate on all rows at once....

Cursor Actions

Key actions involved in working with cursors in PL/SQL are:...

Types of Cursors in PL/SQL

Cursors are classified depending on the circumstances in which they are opened....

Explicit cursor

An explicit cursor is defined in the declaration section of the PL/SQL Block. It is created on a SELECT Statement which returns more than one row....