Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Truncate Table Not Allowed in PL/SQL?
Reading through the dbmsXXXX.sql scripts in the
$ORACLE_HOME/rdbms/admin directory for
8.0.4 last night, I came across an addition to the
dbms_utility package. I don't know how long
this has been there, but it is called
exec_ddl_statement(parse_string varchar2);
so a short solution is:
dbms_utility.exec_ddl_statement( 'truncate table ' || i_table_name );
--
Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk
AleX wrote in message <7hfkij$10l$1_at_nnrp1.deja.com>...
>In article <926455979.23362.0.pluto.d4ee154e_at_news.demon.nl>,
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
>> Truncate is a DDL statement. DDL needs to be done by using dbms_sql
>(Oracle
>> 7,8) or dbms_utility.execute_ddl_statement (Oracle 8).
>> Example (v7)
Received on Fri May 14 1999 - 02:47:02 CDT