Hi All,
I have created a procedure, which will take the Mgr number as input for execution.
When ever data is there for input passed Mgr number we are getting data. But when we don't have data it is not displaying "no data found" message.
create or replace procedure sp1 (mg number)
as
cursor c1 is select * from emp1 where mgr = mg;
i emp1%rowtype;
begin
for i in c1
loop
dbms_output.put_line(i.ename||' '||i.sal);
end loop;
exception
when no_data_found then
dbms_output.put_line('no data found');
end;
/
Can anyone please tell me how to display "no data found" message when there is no data for input Mgr number.
Thanks,
Subash