declare
v_count varchar2(10);
Begin
select t.a into v_count from test1 t
where t.b=&i_no;
exception
WHEN NO_DATA_FOUND THEN
dbms_output.put_line('happy');
commit;
end ;
v_count varchar2(10);
Begin
select t.a into v_count from test1 t
where t.b=&i_no;
exception
WHEN NO_DATA_FOUND THEN
dbms_output.put_line('happy');
commit;
end ;
放在最前面