我正在尝试执行以下 mySql 语句
"DECLARE DONE INT(1) default 0;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET DONE = 1;"
在 SQL Server 2005 中
" DECLARE @DONE INT,
DECLARE CONTINUE HANDLER FOR NOT FOUND SET DONE = 1"
它给出了类似的错误
"Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'CONTINUE'.
Msg 136, Level 15, State 1, Line 1
Cannot use a CONTINUE statement outside the scope of a WHILE statement."