rtc project in exception

declare
catcode number(5);
catdesc varchar2(15);
e1 number(7):=&e1;
first exception;
second exception;
begin
select cat_code,cat_desc into catcode,catdesc from category_header where cat_code=e1;
if catcode=1 then
raise first;
elsif catcode=5 then
raise second;
end if;
exception when first then
dbms_output.put_line(catdesc);
when second then
dbms_output.put_line(catdesc);
end;
/

No comments:

Post a Comment

Template Design by faris vio