【发布时间】:2016-04-02 05:17:20
【问题描述】:
我想知道,我们可以在 ELSE IF 块中声明光标吗? 当我这样做时,我发现了错误 'declare'之前缺少子条款或其他元素。我的代码是
if State is NOT NULL
then
declare t cursor for select *from student;//this line has error
declare continue handler for NOT FOUND set str=1;
else
declare t cursor for select *from student;
end if;
为什么??
【问题讨论】: