'간단한'에 해당되는 글 1건

  1. 2011.10.30 펑션 : 두개 인수를 받아서 하나의 값을 받아내기

테이블명 : PR_CCODE_1

조건절 인수 : code0 , code1

반환값 : code1name

 

##############################################3

 

CREATE OR REPLACE FUNCTION getCode1Name(
        code0 IN      PR_CCODE_1.CODE0%TYPE,
        code1 IN      PR_CCODE_1.CODE1%TYPE
        )
RETURN varchar2
IS
        code1name       PR_CCODE_1.CODE1NAME%TYPE;
BEGIN
        SELECT code1name
               into code1name
               FROM PR_CCODE_1
               WHERE code0 = code0
               and code1 = code1;
        RETURN code1name;

END;

Posted by bestrok
,