以下存儲過程有什麼問題?DB2存儲過程中的錯誤
CREATE PROCEDURE TEST
(IN mbr VARCHAR(30),
OUT sql_state CHAR(5)
)
DYNAMIC RESULT SETS 1 LANGUAGE SQL BEGIN DECLARE SQLSTATE CHAR(5);
DECLARE rs CURSOR WITH RETURN TO CLIENT FOR
SELECT
*
FROM
A.XYZ;
OPEN rs;
SET
sql_state = SQLSTATE;
END @;
您會收到什麼錯誤消息? –
它是DB2 SQ錯誤:SQLCODE:-104,SQLSTATE:42601 – RTA
這是正常的嗎? 'END @;'? –