SQL$HELP72.HLB  —  FOR Counted Control, Arguments  STEP value-expr
    Controls the size of the increment between loop interations. The
    step size is specified using a numeric value expression.

    If omitted the default step size is 1.

    SQL> begin
    cont> declare :i integer;
    cont> for :i in 1 to 20 step 5
    cont> do
    cont>     trace :i;
    cont> end for;
    cont> end;
    ~Xt: 1
    ~Xt: 6
    ~Xt: 11
    ~Xt: 16

                                   NOTE

       Even if the loop control variable is an INTERVAL type the
       STEP must be numeric type. In addition the value must be
       greater than zero - use the REVERSE keyword to decrement the
       loop control variable.
Close Help