Xref: alice comp.databases.oracle.server:36868
Path: alice!news-feed.fnsi.net!news.maxwell.syr.edu!nntp2.dejanews.com!nnrp1.dejanews.com!not-for-mail
From: mgogala@rocketmail.com
Newsgroups: comp.databases.oracle.server
Subject: Re: Truncate in stored procedure
Date: Sat, 02 Jan 1999 01:29:24 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 38
Message-ID: <76jspk$lkc$1@nnrp1.dejanews.com>
References: <76bdjh$7bs$1@nnrp1.dejanews.com> <76dj0c$sls$1@nnrp1.dejanews.com> <368a897e.9954303@news.siol.net>
X-Article-Creation-Date: Sat Jan 02 01:29:24 1999 GMT
X-Http-User-Agent: Mozilla/4.5 [en] (X11; I; SunOS 5.6 i86pc)
X-Http-Proxy: 1.0 x13.dejanews.com:80 (Squid/1.1.22) for client 38.26.182.24

In article <368a897e.9954303@news.siol.net>,
  jmodic@src.si (Jurij Modic) wrote:
> On Wed, 30 Dec 1998 16:05:33 GMT, andrewf@jaredgroup.com wrote:
>
> >Thank you all for the answers. I did not know that 'Truncate' is a DDL. I
> >thought it was like a DML (delete without log). I am curious about the reason
> >it is treated as a DDL by PL/SQL and would appreciate it if you guys have
some
> >explanation. Does it change some internal structure or what? Also, does it
> >issue a 'Commit' as other DDL do, if it does not log its deletes?
>
> It isn't just PL/SQL that treats it like DDL! TRUNCATE command *is*
> DDL command. Not that it doesn't create any redo entries, it doesn't
> create any undo entries, so it can't be rolled back. Besides, you are
> correct, it does perform implicit commit (two commits, to be precise -
> one before it executes and one after it is finished, like any other
> DDL command).
>
> Don't think of it like DELETE without the WHERE condition, you better
> think of it as DROP TABLE + CREATE TABLE with all the other stuf it
> has to do to remain all the constraints, views, synonyms ... and other
> references to the table.
>
> HTH,
> Jurij Modic <jmodic@src.si>
> Certified Oracle7 DBA (OCP)
> ================================================
> The above opinions are mine and do not represent
> any official standpoints of my employer
>
You can, however, execute it from PL/SQL procedure or package
by using DBMS_SQL package. See your applications developer's guide.

--
Mladen Gogala

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
