变量captiono在block3中不是动态的。它在block3中是常量,但是假设在iterator2循环时它会改变。
BLOCK2: BEGIN
DECLARE cur2 CURSOR FOR SELECT id, caption FROM
mazhorik.catalog_items_content;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done2 = TRUE;
OPEN cur2;
iterator2: LOOP
IF done2 THEN
LEAVE iterator2;
END IF;
FETCH cur2 INTO ido, captiono;
BLOCK3: BEGIN
iterator3 : LOOP
SET idoo = ido;
SET captionoo = captiono;
SET captionoo = REPLACE(captionoo, element, '');
SET camel = CONCAT(UCASE(LEFT(element, 1)),
LCASE(SUBSTRING(element, 2)));
END LOOP iterator3;
END BLOCK3;
END LOOP iterator2;
CLOSE cur2;
END BLOCK2;
暂无答案!
目前还没有任何答案,快来回答吧!