Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to execute "truncate table TTT" in procedures?

Re: How to execute "truncate table TTT" in procedures?

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Mon, 16 Oct 2000 18:35:18 +0800
Message-ID: <39EAD9E6.40C6@yahoo.com>

qiangye_at_my-deja.com wrote:
>
> 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.

begin
  execute immediate 'truncate table blah' end

in 8i above, and the equivalent with dbms_sql below that...

ie

dbms_sql.open_cursor
dbms_sql.parse (<your truncate>)
dbms_sql.close

HTH

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk
(faster/mirrored at http://www.oradba.freeserve.co.uk)

Its not the voices in my head that bother me... 
  its the voices in yours.
Received on Mon Oct 16 2000 - 05:35:18 CDT

Original text of this message

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