WHILE LOOP

WHILE LOOP example

  
DECLARE 
	v_num NUMBER:=0;
BEGIN
	WHILE v_num < 3 LOOP 
		v_num:=v_num+1;
		DBMS_OUTPUT.put_line(v_num);
	END LOOP;
END;

Output:

1
2
3