Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

no data found exception

874273Mar 30 2013 — edited Mar 30 2013
Hi

I have written the code like this...But I am not getting when no data found exeception...please advise..!!!!
create or replace procedure dis_emp(v_empno in number) as 

   cursor kk is select * from empl where empno=v_empno;

   a kk%rowtype;


begin
        open kk;
      
     loop

         fetch kk into a;
         exit when kk%notfound;
     dbms_output.put_line(a.empno||'  '||a.ename||'  '||a.job);
     
end loop;
close kk;
        

exception
when no_data_found then
   dbms_output.put_line('Sorry...wrong empid');


 when others then
   dbms_output.put_line('sorry..');
      
end;
regards
SA
This post has been answered by Peter Gjelstrup on Mar 30 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 27 2013
Added on Mar 30 2013
5 comments
158 views