0
我有一個過程在需要爲select語句1設置d_x的地方,d_y對於select語句2,d_z對於select語句3.我怎麼能修改以下程序以實現...如何爲存儲過程中的相同NOT FOUND SQL EXCEPTION設置變量值
CREATE PROCEDURE A()
BEGIN
DECLARE d_a INT;
DECLARE d_b INT;
DECLARE d_c INT;
---
--
-
DECLARE CONTINUE HANDLER FOR NOT FOUND
BEGIN
SET d_x = 1;
SET d_y = 2;
SET d_z = 3;
END;
SELECT aa INTO d_x FROM TEST1;
SELECT bb INTO d_y FROM TEST2;
SELECT cc INTO d_z FROM TEST3;
END
我腦海中的一個解決方案是創建子程序來實現這一點。是否有可能通過單一程序來實現。 – 2014-10-16 15:40:32