Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Trigger
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