|
-
Exception Handling
The following code is returning an error
create or replace procedure sk_test
as
v_sk number(3);
v_errm varchar2(100);
begin
select 5/0 into v_sk from dual;
insert into sk values(v_sk);
commit;
exception
when zero_divide then
begin
v_sk:=0;
SELECT 5/1 into v_sk from user_objects ;
exception
when too_many_rows then
insert into sk values(0);
oommit;
end;
end;
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "REBOOKER.SK_TEST", line 16
ORA-01422: exact fetch returns more than requested number of rows
ORA-01476: divisor is equal to zero
ORA-06512: at line 1
The code within the second exception is not executed.Can I have a method wherein the code with the second exception is executed.
Thanks is advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|