December 2002
Intermediate to advanced
928 pages
85h 29m
English
FORloop_indexIN [REVERSE]lowest_number..highest_numberLOOPexecutable_statement(s) END LOOP;
The traditional “counted” loop in which you specify the number of iterations. The PL/SQL runtime engine automatically declares the loop index a PLS_INTEGER variable; make sure to never declare a variable with that name yourself. The lowest_number and highest_number ranges can be variables but are evaluated only once—on initial entry into the loop. The REVERSE keyword causes PL/SQL to start with the highest_number and decrement down to the lowest_number.