Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Truncate Table in PL/SQL
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
![]() |
![]() |