If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

if you have version 9... you can use
DECLARE
TYPE emp_type IS TABLE OF emp%ROWTYPE
INDEX BY BINARY_INTEGER;
t_emptab emp_type;
BEGIN
SELECT *
BULK COLLECT INTO t_emptab
FROM emp;
FOR i IN 1..t_emptab.COUNT LOOP
DBMS_OUTPUT.PUT_LINE(t_emptab(i).ename);
-- here i have lot of code....
DBMS_OUTPUT.PUT_LINE(t_emptab(i).empno);
END LOOP;
END;