Looping constructs

    Available in

    PSQL

    Syntax

    A WHILE statement implements the looping construct in PSQL. The statement or the block of statements will be executed until the condition returns TRUE. Loops can be nested to any depth.

    A procedure calculating the sum of numbers from 1 to I shows how the looping construct is used.

    Executing the procedure in isql:

    the result is:

    See also

    , , , FOR SELECT,