I am trying to execute following mySql statement
"DECLARE DONE INT(1) default 0;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET DONE = 1;"
in SQL Server 2005 like
" DECLARE @DONE INT,
DECLARE CONTINUE HANDLER FOR NOT FOUND SET DONE = 1"
it gives error like
"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."
DECLARE CONTINUE HANDLERactually does (or link to the docs), for the benefit of SQL Server people who may not be familiar with MySQL.