declare
vno int;
vnum int:=100;
vmsg varchar2(200);
begin
vno:=-20000;
vmsg:='test';
if vnum>100 then
goto error;
end if;
<<error>>
raise_application_error(vno,vmsg);
end;为什么还跳到<<error>>??? PL/SQL goto
vno int;
vnum int:=100;
vmsg varchar2(200);
begin
vno:=-20000;
vmsg:='test';
if vnum>100 then
goto error;
end if;
<<error>>
raise_application_error(vno,vmsg);
end;为什么还跳到<<error>>??? PL/SQL goto
我想用这个例子,说明goto的用法。符合条件的,跳转到error,否则正常执行。
我想用这个例子,说明goto的用法。符合条件的,跳转到error,否则正常执行。declare
vno int;
vnum int:=100;
vmsg varchar2(200);
begin
vno:=-20000;
vmsg:='test';
if vnum>100 then
goto error;
ELSE
GOTO SUCCESS;
end if;
<<error>>
raise_application_error(vno,vmsg); <<SUCCESS>>>
NULL;
end;
我想用这个例子,说明goto的用法。符合条件的,跳转到error,否则正常执行。goto 本来就不建议用了、、跳转可以用RAISE或者 RAISE_APPLICATION_ERROR
从您提供的代码是来看是可以比秒的