如何为DB2/400创建存储过程
1个回答
展开全部
CREATE PROCEDURE "DB2INST2"."SP_SF_GET_PRESC"
(IN "V_GHXH" BIGINT,
IN "V_RECORDSTATUS" SMALLINT,
IN "V_TYPE" SMALLINT,
IN "V_PRESCNO" BIGINT,
IN "V_ISQX" SMALLINT,
OUT "ERR_CODE" INTEGER,
OUT "ERR_TEXT" VARCHAR(100)
)
LANGUAGE SQL
NOT DETERMINISTIC
CALLED ON NULL INPUT
EXTERNAL ACTION
OLD SAVEPOINT LEVEL
MODIFIES SQL DATA
INHERIT SPECIAL REGISTERS
P1: BEGIN
DECLARE SQLCODE INT;
DECLARE V_CFQX SMALLINT;
DECLARE V_SFFYKS BIGINT;--
DECLARE V_YBDM CHAR(4);
--具体实现
END P1;
(IN "V_GHXH" BIGINT,
IN "V_RECORDSTATUS" SMALLINT,
IN "V_TYPE" SMALLINT,
IN "V_PRESCNO" BIGINT,
IN "V_ISQX" SMALLINT,
OUT "ERR_CODE" INTEGER,
OUT "ERR_TEXT" VARCHAR(100)
)
LANGUAGE SQL
NOT DETERMINISTIC
CALLED ON NULL INPUT
EXTERNAL ACTION
OLD SAVEPOINT LEVEL
MODIFIES SQL DATA
INHERIT SPECIAL REGISTERS
P1: BEGIN
DECLARE SQLCODE INT;
DECLARE V_CFQX SMALLINT;
DECLARE V_SFFYKS BIGINT;--
DECLARE V_YBDM CHAR(4);
--具体实现
END P1;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询