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: how to exec "truncate table " in procedures

Re: how to exec "truncate table " in procedures

From: <sybrandb_at_my-deja.com>
Date: Mon, 16 Oct 2000 09:41:00 GMT
Message-ID: <8seifc$259$1@nnrp1.deja.com>

In article <8segle$qi$1_at_nnrp1.deja.com>,   qiangye_at_my-deja.com wrote:
> Dear professionals,
>
> Here I encounter a problem to execute "truncate table TTT" in the
 stored
> procedures. It seems that "table" is the reserved key word for some
> special use in the stored procedures, compared with in PL/SQL.
>
> So, anybody could let me know how to do that? Appreaications in advanc
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

This is a more generic issue. DDL (Data Definition Language) statements are not allowed in PL/SQL (and stored procedures are part of PL/SQL) You'll need to use dbms_sql (7.3 and 8.0) or execute immediate (8i and above).

Hth,

--
Sybrand Bakker, Oracle DBA

All standard disclaimers apply
------------------------------------------------------------------------


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Oct 16 2000 - 04:41:00 CDT

Original text of this message

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