Using an WHILE loop in PL/SQL print numbers 100 down to 0
In PL/SQL code groups of commands are arranged within a block. It groups together related declarations or statements. In declare part, we declare variables and between begin and end part, we perform the operations.
Declare
I number;
Begin
I:=100;
While (I>=0)
loop
Dbms_output.put_line(I);
I:=I-1;
End loop;
End;
Get Answers For Free
Most questions answered within 1 hours.