Explain how to create a Scrollable Cursor with the SCROLL Option.
Syntax for Scrollable cursor:
DECLARE cursor_name [INSENSITIVE] [SCROLL] CURSOR
FOR select_statement
[FOR {READ ONLY | UPDATE [OF column_name [,...n]]}]
Explain how to create a Scrollable Cursor with the SCROLL Option.
Using the SCROLL keyword while declaring a cursor allows fetching of rows in any sequence.
Example:DECLARE employee_curs SCROLL CURSOR FOR SELECT * FROM employee;
The active set of the cursor is stored can be accessed in any order without the need of opening and closing the cursor. The Scroll cursors can be set for select and function cursors but not insert or update statements.