December 2002
Intermediate to advanced
928 pages
85h 29m
English
FORrecord_indexIN [cursor_name| (SELECTstatement)] LOOPexecutable_statement(s) END LOOP;
A loop that is associated with (and defined by) an explicit cursor or a SELECT statement. This type of loop automatically opens the cursor, fetches all rows identified by the cursor, and then closes the cursor. You can embed the SELECT statement directly in the cursor FOR loop.
The PL/SQL runtime engine automatically declares the loop index a record of cursor_name%ROWTYPE; make sure that you never declare a variable with that name yourself.