Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Rollback after truncate?? + 2 more questions :-)

RE: Rollback after truncate?? + 2 more questions :-)

From: Page, Bruce <Bruce.Page_at_BellSouth.com>
Date: Wed, 15 Aug 2001 14:41:19 -0700
Message-ID: <F001.0036C377.20010815145245@fatcity.com>

> 1.Can I rollback after doing a truncate table (it seems to me
> that I can' t)

The truncate command is DDL (like create) and not DML (like delete). All DDL commit work as part of their processing. So if you did some work before issuing a truncate command and then tried to rollback after the truncate command, there would be nothing to rollback since everything had been committed.

> 2. Is there a way to use a command with more than one word in Pl/Sql
> without using it dynamically?

I do not understand the question.

> 3. I have a statement in a package:
>
> Insert into A
> ( Select Col1 ,MyFunction(Col1)
> from B );
>
> If the MyFunction function is made with "create or replace function"
> everything works perfectly,
> but if the same function is declared within the package, I
> get the error
> message:
> PLS-00231 function 'string' may not be used in SQL

You have create it using the same syntax as you did for the truncate command, since you are issuing a DDL statement instead of a DML statement.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Page, Bruce
  INET: Bruce.Page_at_BellSouth.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_at_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).
Received on Wed Aug 15 2001 - 16:41:19 CDT

Original text of this message

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