O'Reilly logo

Oracle SQL and PL/SQL Handbook: A Guide for Data Administrators, Developers, and Business Analysts by John Adolph Palinski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

FOR Loops

Oracle has another powerful looping structure that we have not seen: the FOR loop. There are a number of variations of this structure, the simplest of which is the numeric FOR loop. The most sophisticated and powerful is the cursor FOR loop. This section will discuss the various versions of this looping structure.

Numeric FOR Loops

The chief characteristic of a numeric FOR loop is that it contains a counting variable. This variable is used to determine when the focus should move from the looping structure to the next statement in the procedure. The structure is similar to the simple LOOP structure, except that the counting variable and the number of iterations are defined in the header of the numeric FOR structure. This makes it easier ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required