我的笔记
CREATE PROCEDURE aa(IN p_empno INTEGER)
LANGUAGE SQL
SPECIFIC proc_with_vars -- applies to LUW and iSeries
-- WLM ENVIRONMENT <env> -- applies to zSeries
BEGIN
DECLARE v_empno INTEGER;
DECLARE v_total, v_count INTEGER DEFAULT 0;
SELECT tt.IS_CHECK INTO v_empno FROM table tt ;
END
我的笔记
DROP PROCEDURE bb(INTEGER);
CREATE PROCEDURE bb
(
)
P1: BEGIN
DECLARE V_CMDSELECT VARCHAR(10000);
SET V_CMDSELECT = 'SELECT * FROM user';
P2: BEGIN
DECLARE C1 CURSOR WITH RETURN FOR S1;
PREPARE S1 FROM V_CMDSELECT;
OPEN C1;
END P2;
END;
db2存储过程
最新推荐文章于 2018-12-27 16:02:00 发布