读书人

oracle中continue的兑现方法

发布时间: 2012-08-01 17:53:40 作者: rapoo

oracle中continue的实现方法

1.使用GOTO

例:

for REC in CUR loop

?

if CONDITION then

??? goto BREAKPOINT;

end if;

?

<<BREAKPOINT>>

NULL;

end loop;

?

注意NULL必须有;

?

2.使用EXCEPTION

例:

for REC in CUR loop

?

begin?

? if CONDITION then

?? ?? raise myexception;

? end if;

exception

? when myexception?then

? ?? NULL;

end;

?

end loop;

读书人网 >其他数据库

热点推荐