Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Is this legal?

Re: Is this legal?

From: Anurag Varma <avoracle_at_gmail.com>
Date: 1 Mar 2007 17:57:59 -0800
Message-ID: <1172800679.714193.150100@p10g2000cwp.googlegroups.com>


On Mar 1, 8:36 pm, "Dereck L. Dietz" <diet..._at_ameritech.net> wrote:
> I know in a package I could have something similar to:
>
> PROCEDURE procedure_name
> IS
>
> PROCEDURE local_procedure
> IS
> BEGIN
> ...
> END;
>
> BEGIN
>
> body of procedure ...
>
> END;
>
> My question is can the same thing be done inside an anonymous block within a
> script file like:
>
> DECLARE
>
> PROCEDURE local_procedure
> IS
> BEGIN
> ...
> END;
>
> BEGIN
> ...
> END;
>
> Thanks.

Go on .. test it. You know, you've got to take risks sometimes:

ORA92> declare

  2        procedure local_procedure
  3        is
  4        begin
  5            dbms_output.put_line('Yes its friggin legal');
  6        end;
  7  begin
  8      local_procedure;

  9 end;
 10 /
Yes its friggin legal

PL/SQL procedure successfully completed.

Anurag Received on Thu Mar 01 2007 - 19:57:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US