hey..i tried something like this:
CREATE OR REPLACE PROCEDURE sp AS
DEPT_REC tbldept%TABLETYPE;
CURSOR p_cur IS SELECT * FROM tbldept;
BEGIN
OPEN p_cur;
DBMS_OUTPUT.PUT_LINE('HI');
LOOP
FETCH p_cur INTO DEPT_REC;
EXIT WHEN p_cur%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(DEPT_REC);
END LOOP;
CLOSE p_cur;
END;
output is coming as expected but the column headers are not coming in output..i guess this wont serve my purpose...