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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Trigger

Re: Oracle Trigger

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Tue, 03 Feb 2004 12:10:46 -0800
Message-ID: <1075838987.737966@yasure>


Mark C. Stock wrote:

> Can you elaborate on why the generalization that dynamic SQL is required for
> creating triggers?
>
> -- mcs

DDL can not be performed using PL/SQL ... for example you can't even do this:

BEGIN
    TRUNCATE TABLE my_table;
END;
/

What you must do is:

BEGIN
    EXECUTE IMMEDIATE 'TRUNCATE TABLE my_table'; END;
/

Same rule applies to creating triggers.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Tue Feb 03 2004 - 14:10:46 CST

Original text of this message

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