![]() |
|||
Comments and Discussions
|
About Article
Alternative to Always close your cursor
An alternative (simpler way :) ) is:BEGIN TRANDECLARE IdCursor CURSOR FOR SELECT Id FROM MyTable OPEN IdCursor FETCH NEXT FROM IdCursor INTO @CurrentIdWHILE (@@FETCH_STATUS) = 0 BEGIN -- do work IF @@error 0...
Related Articles
|
|||||||||||||||||||||||||||