Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Can't create table in procedure
Ypu can't use DDL statements directly from PL/SQL. you need to use DBMS_SQL package , which i am sure is supported from oracle7.x onwards. Refer to the PL/SQL user's guide which one or two examples on it.
Regards
Ravi Adapa
sw_at_weinerfamily.org wrote:
> I don't know PL/SQL well. Can you tell me why this doesn't work?
> Is there a problem creating tables in procedures?
>
> CREATE OR REPLACE
> PROCEDURE x AS
> BEGIN
> CREATE TABLE XX
> AS SELECT * FROM transaction where transaction_id < 500
> END;
>
> The error states it didn't expect CREATE
Received on Thu Nov 30 2000 - 04:53:41 CST
![]() |
![]() |