AddThis Social Bookmark Button

This example shows how to use Comosite type

DECLARE
      CURSOR myEmpCursor IS
       SELECT empno, ename
         FROM emp
        ORDER BY empno;
  
       myID     emp.empno%TYPE;
       myName   emp.ename%TYPE;
    BEGIN
 
   OPEN myEmpCursor;
 
   
 
  LOOP
       FETCH myEmpCursor INTO myID, myName;
 
        EXIT WHEN myEmpCursor%NOTFOUND;
 
        DBMS_OUTPUT.PUT_LINE(myID||' '||myName);
        END LOOP;
        CLOSE myEmpCursor;
   END;