My Work
Sunday, January 11, 2009
Reverse FOR..LOOP in PL/SQL
Normal For Loop:
FOR k IN 1..500 LOOP
p := p + 1;
END LOOP;
Reverse For Loop:
BEGIN
FOR i IN REVERSE 1..3 LOOP -- assign the values 1,2,3 to i
DBMS_OUTPUT.PUT_LINE (TO_CHAR(i));
END LOOP;
END;
/
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
search engine
Custom Search
No comments:
Post a Comment