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: Eric <no_spam_at_earth.com>
Date: Sat, 13 Nov 1999 03:29:56 GMT
Message-ID: <WNosOFR7z7IJ69dJmE9GpM+=V4BH@4ax.com>


This should doer...

create or replace procedure truncate_table(table_name varchar2) is
 cid integer;
begin
 cid := dbms_sql.open_cursor;
 dbms_sql.parse(cid, 'truncate table ' || table_name, dbms_sql.v7);  dbms_sql.close_cursor(cid);
exception
 when others then
  dbms_sql.close_cursor(cid);
  raise;
end;

On Thu, 11 Nov 1999 09:41:02 +0800, "Chua Boon Yiang" <chuaby_at_hotmail.com> wrote:

>Hi
>
>can i do a "truncate table T1" in a PL/SQL block ?
>as i need to manipulate a temp table very often, w/o the ability to do a
>truncate table will have abit efficiency problem.
>
>Thanks
>Boon Yiang
>
Received on Fri Nov 12 1999 - 21:29:56 CST

Original text of this message

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