Saturday, November 15, 2008

Using the EXIT-WHEN Statement in PL/SQL

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:

search engine

Custom Search