Cursor:
Cursor is a memory variable, it take space with in row and column.it also can take matrix data.
Also ,A cursor is a pointer that points to a result of a query.
PL/SQL has two types of cursors:
•Implicit cursors
•Explicit cursors
Implicit Cursors
Whenever Oracle executes an SQL statement such as Select Into , Insert , Update and Delete it automatically creates an implicit cursor.
Implicit Cursors Example:
![](https://techaid71.xyz/wp-content/uploads/2021/11/implicity-Cursor-Example.jpg)
Explicit cursors
An explicit cursor is an Select statement declared explicitly in the declaration section of the current block or a package specification.
Explicit cursors Example:
![](https://techaid71.xyz/wp-content/uploads/2021/11/Explicit-Cursor-Example-1.jpg)
Cursor with parameters:
Example:
![](https://techaid71.xyz/wp-content/uploads/2021/11/Cursor-with-parameters.jpg)
PLSQL Records and Cursor:
Difference between records and cursor is : Cursor take data from direct table where records take data from cursor.
![](https://techaid71.xyz/wp-content/uploads/2021/11/PLSQL-Records-and-Cursor.jpg)
Cursor FOR Loops:
Example:
![](https://techaid71.xyz/wp-content/uploads/2021/11/Cursor-FOR-Loops.jpg)