첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
SET SERVEROUTPUT ON;

DECLARE
    CURSOR EMPLOYEE_CURSOR IS
        SELECT * FROM SCOTT.EMP;

    V_EMPLOYEE_RECORD EMPLOYEE_CURSOR%ROWTYPE;
BEGIN
    OPEN EMPLOYEE_CURSOR;
    
    LOOP
        FETCH EMPLOYEE_CURSOR INTO V_EMPLOYEE_RECORD;
        
        EXIT WHEN EMPLOYEE_CURSOR%NOTFOUND;
        
        DBMS_OUTPUT.PUT_LINE(V_EMPLOYEE_RECORD.ENAME);
    END LOOP;
    
    CLOSE EMPLOYEE_CURSOR;
END;
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요