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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Truncate table not allowed in SP

Re: Truncate table not allowed in SP

From: Bill Manry <B.Manry_at_upsizeme.us.oracle.com>
Date: 19 Jun 1998 00:09:40 GMT
Message-ID: <6mca84$o21$1@inet16.us.oracle.com>


Kenny Yuen (kenny_at_ppg01.sc.hp.com) wrote:
>Can someone help me to understand why "truncate table" would cause
>a compilation error if it is used in a store procedure? It seems
>to me that certain SQL commands are not allowed in SP. I could
>work around it with the "delete from" but I really want to use
>the "truncate table" statement instead. Please advice how I might
>be able to do that.

TRUNCATE is DDL, not DML. Only DML SQL can be issued directly in a stored procedure. To issue a DDL statement you will need to use the DBMS_SQL procedure package.

/b
--
Bill Manry - IBM Products Division - Oracle Corporation These are my opinions, not necessarily Oracle's. Remove "." from "B.Manry" to email me. Received on Thu Jun 18 1998 - 19:09:40 CDT

Original text of this message

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