Cursor FOR loop
|Top Previous Next|
The Cursor FOR Loop
Here we have our beloved FOR EACH loop in Progress.
Note Oracle automatically declares rec_cust variable, declares anonymous cursor for SELECT and opens it on the first iteration, fetches records until SQL%NOTFOUND and finally closes it upon exiting the loop. As with numeric FOR LOOP rec_cust is local and could not be referenced outside the loop.