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: Stephan Born <stephan.born_at_beusen.de>
Date: Mon, 15 Nov 1999 10:41:21 +0100
Message-ID: <382FD541.CDCC607B@beusen.de>


> TRUNCATE is a SQL*Plus command that can not be executed in PL/SQL
>

No! Truncate is a SQL-command! But it is a DDL-command. Such commands CAN NOT be executed
from within a PL/SQL-block. In Ora7.x you have to use the package dbms_sql which provides the functionality
of dynamic-SQL. With this package you can execute DDL-commands from within PL/SQL..
>
> > 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.
> >

Regards, Stephan

--


Dipl.-Inf. (FH) Stephan Born   | beusen Consulting GmbH
fon: +49 30 549932-0           | Landsberger Allee 392
fax: +49 30 549932-29          | 12681 Berlin
mailto:stephan.born_at_beusen.de  | Germany
---------------------------------------------------------------
       PGP-Key verfügbar       |      PGP-Key available
---------------------------------------------------------------


Received on Mon Nov 15 1999 - 03:41:21 CST

Original text of this message

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