From carmichr@hotmail.com Thu, 21 Jun 2001 11:40:08 -0700
From: "Rachel Carmichael" <carmichr@hotmail.com>
Date: Thu, 21 Jun 2001 11:40:08 -0700
Subject: Re: TRUNCATE IN PL/SQL
Message-ID: <F001.00332716.20010621114647@fatcity.com>
MIME-Version: 1.0
Content-Type: text/plain


this is what happens when I post with insufficient blood levels of caffeine.

take what I said and reverse it. You need DROP any table privilege, not 
delete any table.

Early editions of the docs said you needed DELETE any table, they were 
wrong. Latest editions of the docs have been amended and are correct (at 
least about this)

sigh.....


>From: "Rachel Carmichael" <carmichr@hotmail.com>
>Reply-To: ORACLE-L@fatcity.com
>To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
>Subject: Re: TRUNCATE IN PL/SQL
>Date: Thu, 21 Jun 2001 08:12:44 -0800
>
>and the docs (can't remember if it's 6 or 7) used to state "drop any table"
>priv....
>
>after all, the docs are NEVER wrong
>
>
>>From: "Dennis M. Heisler" <dheisler@binghamton.edu>
>>Reply-To: ORACLE-L@fatcity.com
>>To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
>>Subject: Re: TRUNCATE IN PL/SQL
>>Date: Thu, 21 Jun 2001 06:06:53 -0800
>>
>>Oracle 7 docs state you need "delete any table", Oracle 8 docs state you
>>need "drop any table" privilege to truncate another owner's table.
>>
>>
>>Dennis
>>
>>
>>Witold.Iwaniec@atl.bluecross.ca wrote:
>> >
>> > Not 100% sure but I think only the table owner can use "TRUNCATE"
>> >
>> > Witold
>> >
>> > Raymond Lee Meng Hong <RAYMOND@infopro.com.my> on 06/21/2001 01:10:52
>> >
>> > Please respond to ORACLE-L@fatcity.com
>> >
>> > To:   Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
>> > cc:    (bcc: Witold Iwaniec/ATL_BLUECROSS_CA)
>> >
>> > Got these error ? may be my DBA restrict these ?
>> >
>> > ORA-00903: invalid table name
>> > ORA-06512: at "SYS.DBMS_SYS_SQL", line 239
>> > ORA-06512: at "SYS.DBMS_SQL", line 32
>> > ORA-06512: at line 8
>> >
>> > -----Original Message-----
>> > Sent: Thursday, June 21, 2001 11:20 AM
>> > To: Multiple recipients of list ORACLE-L
>> >
>> > You can try the following , not sure if it will work though......let me
>>know
>> > if it does... :-)
>> >
>> > DECLARE
>> > myCur          number;
>> > mySQL          varchar2(2000);
>> >
>> > BEGIN
>> > mySQL := 'TRUNCATE TABLE (table_name)';
>> > myCur := DBMS_SQL.open_cursor;
>> > DBMS_SQL.PARSE(myCur, mySQL, DBMS_SQL.NATIVE);
>> > DBMS_SQL.CLOSE_CURSOR(myCur);
>> > END;
>> >
>> > Regards,
>> > Karthik
>> >
>> > -----Original Message-----
>> > Sent: Thursday, June 21, 2001 10:55 AM
>> > To: Multiple recipients of list ORACLE-L
>> >
>> >  Hello guru , how can I execute a truncate table in  PL/SQL ?? It only
>>work
>> > for delete DML only ? why ?
>> >
>> > Raymond Lee
>> > Infopro Sdn Bhd
>> > Block B3 Level 8, Leisure Commerce Square
>> > No. 9, Jalan PJS 8/9 46150 Petaling Jaya
>> > Selangor , Malaysia
>> > Tel : 603-78766666 ext : 266   Fax :  603-78761233
>> > Email : Raymond@infopro.com.my
>> >
>> > "Friendship with oneself is all important, because without it one 
>>cannot
>>be
>> > friend with anyone else in the world "
>> > - Eleanor Roosevelt
>> >
>> > --
>> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
>> > --
>> > Author: Mohan, Karthik (GEP)
>> >   INET: Karthik.Mohan@gepex.ge.com
>> >
>> > Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
>> > San Diego, California        -- Public Internet access / Mailing Lists
>> > --------------------------------------------------------------------
>> > To REMOVE yourself from this mailing list, send an E-Mail message
>> > to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
>> > the message BODY, include a line containing: UNSUB ORACLE-L
>> > (or the name of mailing list you want to be removed from).  You may
>> > also send the HELP command for other information (like subscribing).
>> > --
>> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
>> > --
>> > Author: Raymond Lee Meng Hong
>> >   INET: RAYMOND@infopro.com.my
>> >
>> > Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
>> > San Diego, California        -- Public Internet access / Mailing Lists
>> > --------------------------------------------------------------------
>> > To REMOVE yourself from this mailing list, send an E-Mail message
>> > to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
>> > the message BODY, include a line containing: UNSUB ORACLE-L
>> > (or the name of mailing list you want to be removed from).  You may
>> > also send the HELP command for other information (like subscribing).
>> >
>> > --
>> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
>> > --
>> > Author:
>> >   INET: Witold.Iwaniec@atl.bluecross.ca
>> >
>> > Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
>> > San Diego, California        -- Public Internet access / Mailing Lists
>> > --------------------------------------------------------------------
>> > To REMOVE yourself from this mailing list, send an E-Mail message
>> > to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
>> > the message BODY, include a line containing: UNSUB ORACLE-L
>> > (or the name of mailing list you want to be removed from).  You may
>> > also send the HELP command for other information (like subscribing).
>>--
>>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>>--
>>Author: Dennis M. Heisler
>>   INET: dheisler@binghamton.edu
>>
>>Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
>>San Diego, California        -- Public Internet access / Mailing Lists
>>--------------------------------------------------------------------
>>To REMOVE yourself from this mailing list, send an E-Mail message
>>to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
>>the message BODY, include a line containing: UNSUB ORACLE-L
>>(or the name of mailing list you want to be removed from).  You may
>>also send the HELP command for other information (like subscribing).
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Rachel Carmichael
>  INET: carmichr@hotmail.com
>
>Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
>San Diego, California        -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from).  You may
>also send the HELP command for other information (like subscribing).

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rachel Carmichael
  INET: carmichr@hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


