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