Q:

Write a program in PL/SQL to explain the uses of nested for loop with label

0

Write a program in PL/SQL to explain the uses of nested for loop with label.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

PL/SQL Code:

BEGIN
  <>
  FOR j IN 1..5 LOOP
    <<loop_inner>>
    FOR j IN 1..4 LOOP
      IF loop_outer.j = 4 THEN
        DBMS_OUTPUT.PUT_LINE
          ('When the value of j of outer loop: ' || TO_CHAR(loop_outer.j) || ' then the value of j in the inner loop: '
           || TO_CHAR(loop_inner.j));
      END IF;
    END LOOP loop_inner;
  END LOOP loop_outer;
END;

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now