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: Truncate Table Not Allowed in PL/SQL?

Re: Truncate Table Not Allowed in PL/SQL?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 14 May 1999 08:47:02 +0100
Message-ID: <926669903.15373.0.nnrp-04.9e984b29@news.demon.co.uk>

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

Original text of this message

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