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: PL/SQL error?

Re: PL/SQL error?

From: Jared Still <jkstill_at_gmail.com>
Date: Tue, 27 Nov 2007 16:17:07 -0800
Message-ID: <bf46380711271617t2f1d2913gfc419d196069501d@mail.gmail.com>


On 11/27/07, Jared Still <jkstill_at_gmail.com> wrote:
>
> The posted trigger is for all of update, delete, insert.
> What happens if you remove INSERT and DELETE from the trigger?
>

Well, that wasn't it:

16:16:13 SQL>alter session set plsql_warnings = 'enable:all';

Session altered.

16:16:13 SQL>
16:16:13 SQL>create table my_table ( x integer);

Table created.

16:16:13 SQL>
16:16:13 SQL>CREATE OR REPLACE
16:16:13   2  TRIGGER my_table_trg
16:16:13   3    AFTER INSERT OR DELETE OR UPDATE
16:16:13   4    ON my_table
16:16:13   5    FOR EACH ROW
16:16:13   6  DECLARE
16:16:13   7          v integer;
16:16:13   8  BEGIN
16:16:13   9          IF INSERTING THEN
16:16:13  10                  v := 1;
16:16:13  11          ELSIF UPDATING THEN
16:16:13  12                  IF :NEW.x <> :OLD.x
16:16:13  13                  THEN
16:16:13  14                          v := 1;
16:16:13  15                  END IF;
16:16:13  16          ELSIF DELETING THEN
16:16:13  17                  v := 1;
16:16:13  18          END IF;
16:16:13  19  END;
16:16:13  20  /

Trigger created.

16:16:13 SQL>
16:16:13 SQL>show error
No errors.
16:16:13 SQL> Perhaps you could provide a reproducible test case?

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Nov 27 2007 - 18:17:07 CST

Original text of this message

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