DECLARE
TYPE EmpRecd
IS RECORD(V_Emp Emp%ROWTYPE);
V_EmpRecd EmpRecd;
TYPE EmpTbl
IS TABLE OF V_EmpRecd%TYPE;
V_EmpTbl EmpTbl;
TYPE EmpRef
IS REF CURSOR
RETURN EmpRecd;
V_EmpRef EmpRef;
BEGIN
OPEN V_EmpRef
FOR SELECT * FROM Emp;
FETCH V_EmpRef BULK COLLECT INTO V_EmpTbl;
CLOSE V_EmpRef;
FOR Ind IN V_EmpTbl.FIRST..V_EmpTbl.LAST
LOOP
DBMS_OUTPUT.PUT_LINE(V_EmpTbl(Ind).Empno||','||V_EmpTbl(Ind).Ename);
END LOOP;
END;
If we are taking only some columns from a table in record type its working but if we are taking %ROWTYPE its not working.Can anyone please help me out from this