Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: executing a list of DDL statements in one call
If you only need automatically execute several DDL you can simply use script
(text file):
myscript.sql
You can execute this script from SQL*Plus SQL> @myscript.sql
If you need create several objects in one step (all or nothing) you can use CREATE SCHEMA construction.
If you want to create different objects in each execution of the _procedure_, use dinamic SQL (DBMS_SQL package )
Regards,
Mark
Jerwynn wrote in message <3765C351.9754B8A2_at_i-manila.com.ph>...
>Hi,
>
> I need to execute several DDL statements, specifically CREATE OR
>REPLACE FUNCTION command (which is read from a file). PL/SQL begin ...
>end doesn't allow DDL statements inside.
>Is there another way to run the DDL statements in one call?
>
> Oracle has a CREATE PACKAGE command, which can contain several
>functions. However, I want my FUNCTIONS to be created in the
>top-level. Thanks.
>
>Regards,
>
>Jerwynn Lee
>
Received on Tue Jun 15 1999 - 10:47:34 CDT