1. Use the DECLARE statement to declare the cursor. This step specifies the type of cursor and the query that defines the data to retrieve. SQL Server creates the memory structures that support the cursor. No data is retrieved yet. 2. Execute the OPEN statement to open the cursor. In this step, SQL Server executes [...]
Archive for the ‘cursors’ Category
Handling cursors
Posted in cursors on September 24, 2009 | Leave a Comment »
Types of Cursors
Posted in cursors on September 23, 2009 | Leave a Comment »
Types of cursors: Forward-only cursors A forward-only cursor does not provide the option to scroll through the data. Using this type of cursor, you can retrieve rows from the beginning of the result set to the end only. Rows are not retrieved until they are requested by using the FETCH statement. For this reason, using [...]