Showing posts with label RETURN. Show all posts
Showing posts with label RETURN. Show all posts

Monday, October 8, 2012

RETURN statement inside a Procedure

Can we have a RETURN statement inside a Procedure?

Yes, as long as RETURN does not return any values
In procedures, a RETURN statement cannot return a value, and therefore cannot contain an expression. The statement simply returns control to the caller before the normal end of the procedure is reached.

Friday, July 2, 2010

RETURN Statement

   
   Can we use RETURN statement in Procedure?
     Yes
     
   Check out the Below Sample
   create or replace procedure p is
    begin  
      dbms_output.put_line('one');
      return;
      dbms_output.put_line('two');
   end;
   
   exec p;
   
   Would Return
   
   one