Re: Truncate Table in a PL/SQL Block
Date: 1996/10/25
Message-ID: <3270D7C8.58DB_at_cincom.com>#1/1
michael j miller wrote:
>
> >Have you tried using built-in package DBMS_SQL to accomplish this?
> >Since it is not possible to use DDL in a PL/SQL block, this is a way
> >of getting around the restriction. Look in the PL/SQL User's Guide
> >for information on this procedure. Hope this helps.
>
> doesn't the SQL statement :
>
> truncate table <name>
>
> work? and you don't need DBMS_SQL to do it?
>
> check 7.3 SQL Reference Manual (page 4-455)
>
> if you wanted to "drop" a table, you have to use DBMS_SQL
I know in Oracle 7.1, and I think even in 7.2, the TRUNCATE command is a DDL command, and you have to use DBMS_SQL if you want to use it in PL/SQL. Did they change that restriction in Oracle 7.3? Is the TRUNCATE command now a DML statement?
Brian
-- Brian M. Biggs mailto:bbiggs_at_cincom.com Cincom Systems, Inc. voice: (513) 677-7661 http://www.cincom.com/Received on Fri Oct 25 1996 - 00:00:00 CEST