How it works: if, elsif, else (then) (Click on the images to see them clearly)
Ref: https://docs.oracle.com/cd/B13789_01/appdev.101/b10807/13_elems024.htm
Example:
Ref: https://docs.oracle.com/cd/B13789_01/appdev.101/b10807/13_elems024.htm
Reverse For Loop
Ref: For Loop Examples in Oracle
https://docs.oracle.com/cd/E11882_01/appdev.112/e25519/controlstatements.htm#BABEFFDC
Oracle While Loop
While loop example from the referenced url
DECLARE
done BOOLEAN := FALSE;
BEGIN
WHILE done LOOP
DBMS_OUTPUT.PUT_LINE (‘This line does not print.’);
done := TRUE; — This assignment is not made.
END LOOP;
WHILE NOT done LOOP
DBMS_OUTPUT.PUT_LINE (‘Hello, world!’);
done := TRUE;
END LOOP;
END;
/