Procedures do not return values ... Functions do ... I suggest checking the documentation for "Create Function" rather than "Create Procedure" and all will be revealed.
JNewMember wrote: > I was able to construct the procedure without syntax but i think I am > not handling exceptions correctly. > > create or replace procedure check_dno (deptNum integer) > is > v_deptNum integer; > returnValue integer; > begin > select deptno into v_deptNum from dept where deptno = deptNum; > if deptNum = v_deptNum then > returnValue := -1; > else > returnValue := 1; > end if; > exception > when access_into_null then > dbms_output.put_line('Null Pointer Exception');s > dbms_output.put_line(returnValue); > end check_dno; > > What I want to do is based on what select query find return the value. > > Thanks, > Anu > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en -~----------~----~----~----~------~----~------~--~---