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: Peter <p.c.de.wolff_at_zonnet.nl>
Date: Mon, 16 Oct 2000 11:36:14 +0200
Message-ID: <39eacba3@wau.nl>

Here we go again:

Truncate is a so called DDL statement . These type of statements alter the data dictionary (table layouts etc).
You cannot use DDL statements in PL/SQL.

So you cannot use truncate, alter table/view, drop .., create ... in a pl/sql block.

Sorry.

But never a problem without a solution: with the package DBSM_SQL, you can do DDL statements in the database. But ask yourself why these statements don't belong in packages etc.

Peter

<qiangye_at_my-deja.com> wrote in message news:8segle$qi$1_at_nnrp1.deja.com...
> 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.
Received on Mon Oct 16 2000 - 04:36:14 CDT

Original text of this message

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