PL/SQL While Loop

Here body of the loop statements are executed repeatedly until condition is false

Below is the syntax:

WHILE condition

LOOP

Executable statements;

END LOOP;

Write a program to print the statement using LOOP, below is the example

DECLARE

a number(10) := 1;

BEGIN

WHILE a <= 10

LOOP

a := a+1;

dbms_output.out_line(a);

END LOOP;

END;