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 in PL/SQL

Re: Truncate Table in PL/SQL

From: Antonio Sant <asant_at_iol.it>
Date: Sun, 14 Nov 1999 16:53:11 GMT
Message-ID: <XNBX3.50911$s17.526662@typhoon.libero.it>

Igor A. Feoktistov ha scritto nel messaggio <80lvf2$8qn$1_at_dream.ins.dn.ua>...
>dgmenace <dgmenace_at_netscape.net> wrote:
>> TRUNCATE is a SQL*Plus command that can not be executed in PL/SQL
>No, you are mistake. TRUNCATE is DDL command and can't be executed in
PL/SQL  You must use Dynamic-SQL if you want to use TRUNCATE TABLE!

Something like:

sql_string LONG :='TRUNCATE TABLE T1';

dbms_sql.parse(my_cursor,sql_string,dbms_sql.native); ret_rows:=dbms_sql.execute(my_cursor);

Look at the manual for more info!

Bye! Received on Sun Nov 14 1999 - 10:53:11 CST

Original text of this message

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