跳出当前循环进入下一个循环周期,像java,c++等语言中的contiune一样,可以使用goto搞定,其实完全没有必要啊
[php]
declare
cursor cur is
select name from trademark;
res cur%rowtype;
begin
open cur;
loop
>--定义标签
fetch cur
into res;
exit when cur%notfound; --退出循环
if res.name = '神州行' then
goto outer; --直接跳出当前循环,fetch下一条
end if;
dbms_output.put_line(res.name);
end loop;
close cur;
end;
[/php]