■ SELECT ... INTO 구문을 사용해 값 구하기

------------------------------------------------------------------------------------------------------------------------

 

SET SERVEROUTPUT ON;

 

DECLARE

    V_JOB SCOTT.EMP.JOB%TYPE;

    V_MGR SCOTT.EMP.MGR%TYPE;

BEGIN

    SELECT JOB, MGR INTO V_JOB, V_MGR

    FROM  SCOTT.EMP

    WHERE EMPNO = 7369;

 

    DBMS_OUTPUT.PUT_LINE(V_JOB || ' ' || V_MGR);

END;

 

------------------------------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요