Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Truncate table not allowed in SP
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