65.9K
CodeProject is changing. Read more.
Home

Always close your cursor

starIconstarIconstarIconstarIconstarIcon

5.00/5 (2 votes)

Oct 18, 2011

CPOL
viewsIcon

5760

You also might want to look into the "LOCAL" keyword.This limits the scope of the cursor to the context in which it is created.DECLARE IdCursor CURSOR LOCAL FOR SELECT Id FROM MyTableThis is beneficial for many reasons.

You also might want to look into the "LOCAL" keyword. This limits the scope of the cursor to the context in which it is created.
DECLARE IdCursor CURSOR LOCAL FOR SELECT Id FROM MyTable
This is beneficial for many reasons.