关于游标
1.ORACLE的游标中执行跳出需要关闭吗?
比如
declare cursor mycur is select col1 from tablea ;
open mycur;
loop
fetch into ...
exit...
/*
do something
*/
if false then
close mycur;
return;
end if;
end loop;
close mycur;
end;
2.如果我要在游标中使用goto,该如何写呢?
比如
declare cursor mycur is select col1 from tablea ;
open mycur;
loop
fetch into ...
exit...
/*
do something
*/
if false then
goto error;
end if;
end loop;
close mycur;
end;
<<error>>
end loop;
close mycur;
return;