Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to exec "truncate table " in procedures
create or replace procedure truncate_table ((table_name in varchar2) as
cursorid integer;
begin
cursorid := dbms_sql.open_cursor;
dbms_sql.parse(cursorid,'truncate table '||table_name,dbms_sql.v7);
dbms_sql.close_cursor(cursorid);
exception
when others then dbms_sql.close_cursor(cursorid);
raise;
end;
<qiangye_at_my-deja.com> wrote in message news:8segle$qi$1_at_nnrp1.deja.com...
> Dear professionals,
>
> Here I encounter a problem to execute "truncate table TTT" in the stored
> procedures. It seems that "table" is the reserved key word for some
> special use in the stored procedures, compared with in PL/SQL.
>
> So, anybody could let me know how to do that? Appreaications in advanc
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Oct 16 2000 - 16:39:16 CDT