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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Can't create table in procedure

Re: Can't create table in procedure

From: Ravi Adapa <ravi.adapa_at_bt.com>
Date: Thu, 30 Nov 2000 10:53:41 +0000
Message-ID: <3A2631B5.48D79821@bt.com>

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

Original text of this message

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