Cursor in Procedure PL/SQL


**********************************************
Display all employees information

CREATE OR REPLACE PROCEDURE EMP_INFO IS
CURSOR C1 IS SELECT * FROM EMP;
BEGIN
FOR E IN C1 LOOP
 DBMS_OUTPUT.PUT_LINE(E.EMPNO||' '||E.ENAME||' '||E.SAL);
END LOOP;
END;

Previous
Next Post »