Always close your cursor





5.00/5 (2 votes)
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.