PL/SQL Use Loop with "Exit When" Condition


declare
  v_student_id students.section_id%type:=5;
  v_surname students.student_surname%type;
begin
  loop
        v_student_id:=v_student_id+1;
        insert into students
        (
          student_id,
          student_surname
        )
        values
        (
          v_student_id,
          'Test xyz'
        );
        exit when v_student_id=10;
      end loop;
      dbms_output.put_line('Done...');
end;

Comments

Popular posts from this blog

Solution for "Can not obtain Oracle client information from registry"

Solution for the fault: "System.Diagnostics.Process.Start is not working on IIS, but working on ASP.NET Development Server"