참조 : http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.db2.luw.sql.ref.doc/doc/r0004461.html


ex) 생성 예시
CREATE OR REPLACE FUNCTION CADM.GET_COMBO_NM(
    I_SUP_CD IN TB_CU001.SUP_CD%TYPE,
    I_COM_CD IN TB_CU001.COM_CD%TYPE
) RETURN VARCHAR2
IS
    V_CD_NM  TB_CU001.CD_NM%TYPE;
BEGIN
    SELECT CD_NM
      INTO V_CD_NM
      FROM TB_CU001
     WHERE SUP_CD = I_SUP_CD
       AND COM_CD = I_COM_CD;
    RETURN (V_CD_NM);
END;

+ Recent posts