There is another way to iterate a loop except the FOR and WHILE Loop. And we also can exit with using 'EXIT WHEN'.
LOOP
counter := counter + 1;
total := total + counter * counter;
-- exit loop when condition is true
EXIT WHEN total > 25000;
END LOOP;
No comments:
Post a Comment