BEGIN
declare _abc varchar(200);
declare stopFlag int;
DECLARE cursor_name CURSOR
FOR
select zhuanyuan from server;
DECLARE CONTINUE HANDLER FOR NOT FOUND set stopFlag=1;
OPEN cursor_name;
REPEAT
FETCH cursor_name INTO _abc;
begin
if _abc='root'
then
insert t(s1) values(3333);
end if;
end;
UNTIL stopFlag = 1
END REPEAT;
CLOSE cursor_name;
END;
声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。