I have written the below program in PL/SQL to insert 5 rows in Students table. As per the loop condition the row count should be 5 but it is showing only 1. Placing DBMS output under the loop also didn't help.
DECLARE
v_input_1 INT;
v_input_2 VARCHAR2(15);
v_input_3 VARCHAR2(10);
v_counter NUMBER := 10;
BEGIN
v_input_1:= 0;
v_input_2:= &Type_student_name;
v_input_3:= &Type_student_class;
LOOP
INSERT INTO STUDENTS(id, student_name, student_class)
VALUES(v_input_1+v_counter, v_input_2, v_input_3);
v_counter:=v_counter+10;
EXIT WHEN V_counter > 50;
--DBMS_OUTPUT.PUT_LINE('Total rows inserted : '||SQL%ROWCOUNT);
END LOOP;
DBMS_OUTPUT.PUT_LINE('Total rows inserted : '||SQL%ROWCOUNT);
END;