Answers

Question and Answer:

  Home  SQL Server DB Administrator

⟩ 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.

 145 views

More Questions for you: