Question - Define Cursor and its types.
Answer -
Cursor is a temporary work area that stores the data, as well as the result set, occurred after manipulation of data retrieved. A cursor can hold only one row at a time.
The 2 types of Cursor are:
- Implicit cursors are declared automatically when DML statements like INSERT, UPDATE, DELETE is executed.
- Explicit cursors have to be declared when SELECT statements that are returning more than one row are executed.