By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
I read your answer regarding memory links. I know that when you explicitly open a cursor (OPEN c1; for example), you should close the cursor explicitly also (CLOSE c1). Do you also need to close the cursor after a for loop? For example:
FOR i in c1 LOOP
You can close the cursor at any time you are done with it. However, it is good programming practice to open the cursor right before the loop that processes it and then close the cursor when the loop finishes. The cursor is only used in the loop (after all, you're looping through the cursor's rowset) so if you do not close it right after the loop, you might forget to close it later.