Re: TRUNCATE TABLE in PL/SQL

From: <stowe_at_mcs.net>
Date: 1995/05/25
Message-ID: <3q2crr$fep_at_News1.mcs.com>#1/1


> rmartin_at_mindspring.com (Robert Martin) writes:
> Is it possible to do a TRUNCATE (or something equivalent) from within a
> PL/SQL program? I'm having to do a lot of DELETE <table_name>; COMMIT; on
> large tables and it is extremely slow compared to TRUNCATE.
>>>>

Yes, and no -- since it's a SQL DDL command, not a SQL DML command, you'll need to use a procedure such as DO_SQL . (You didn't mention the version of PL/SQL, nor if it's executing on the client or the server. The procedures are the same, but the available packages differ.)

Michael Stowe
Constellation Engineering, Inc.
http://www.mcs.com/~stowe Received on Thu May 25 1995 - 00:00:00 CEST

Original text of this message