Hi
I have below code . It will print the elements from first to last . I have to print this element from last element to first element. How can we do this ?
We cannot use last..first methods because it is descending sequence.
DECLARE
type nested_list_type
IS
TABLE OF NUMBER;
mylist nested_list_type := nested_list_type();
BEGIN
mylist.extend(3);
mylist(1) := 1;
mylist(2) := 100;
mylist(3) := 60;
FOR i IN mylist.first..mylist.last
LOOP
IF (mylist.exists(i)) THEN
dbms_output.put_line(mylist(i));
END IF;
END LOOP;
END;
Excepted output :
60
100
1