CREATE OR REPLACE PROCEDURE getcitiesBulk (ccode country.code%TYPE)
IS
  TYPE ctynametabtype IS TABLE OF City.Name%TYPE
       INDEX BY BINARY_INTEGER;
  cities ctynametabtype;
  i NUMBER;
  BEGIN
    execute immediate 'select name from city where country = :1'
      bulk collect into cities
      using ccode;
    i := cities.first;
    WHILE NOT i IS NULL LOOP
      dbms_output.put_line(i || ' ' || cities(i));
      i := cities.next(i);
    END LOOP;
  END;
/
execute getcitiesBulk('AUS');
