SQL Server Database Administrator Question:
Download Job Interview Questions and Answers PDF
How to create a Scrollable Cursor with the SCROLL Option?
Answer:
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.
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.
Download SQL Server DB Administrator Interview Questions And Answers
PDF
Previous Question | Next Question |
How to control the amount of free space in your index pages? | What is DBCC? |