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: Mark C. Stock <mcstockX_at_Xenquery>
Date: Tue, 3 Feb 2004 17:18:26 -0500
Message-ID: <0eadnfS3GvrBg73dRVn-uA@comcast.com>

"Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message news:1075838987.737966_at_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)
|

that's well known when using PL/SQL, but that was not so in the OP's case -- he was not using PL/SQL, but submitting SQL statements via JDBC.

so there is absolutely no need to do anything other than submit a properly formed DDL statement.

Received on Tue Feb 03 2004 - 16:18:26 CST

Original text of this message

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