declare
v_foundrows boolean := false;
begin
for r in ( select * from emp where employee_id= &dno )
loop
dbms_output.put_line(r.last_name || ' ' || r.salary);
v_foundrows := true;
end loop;
if not v_foundrows then
raise no_data_found;
end if;
exception
when no_data_found then
dbms_output.put_line('hello');
end;
v_foundrows boolean := false;
begin
for r in ( select * from emp where employee_id= &dno )
loop
dbms_output.put_line(r.last_name || ' ' || r.salary);
v_foundrows := true;
end loop;
if not v_foundrows then
raise no_data_found;
end if;
exception
when no_data_found then
dbms_output.put_line('hello');
end;
0 comments:
Post a Comment