declare 
  p person_type;
  enum o_employees.eno%type;
  cursor c is
    select eno,person from o_employees;

begin
  open c;
  loop
    fetch c into enum, p;
    exit when c%notfound;
    dbms_output.put('ENO: ' || enum);
    dbms_output.put('   ENAME: ' || p.name);
    dbms_output.put_line('   ZIP: ' || 
                         p.address.zip);
  end loop;
  close c;
end;
/
show errors
