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:06:51 -0800
Message-ID: <bf46380711271606p38982cf1h806487307d57c7aa@mail.gmail.com>


On 11/27/07, William Wagman <wjwagman_at_ucdavis.edu> wrote:
>
>
> TRIGGER_MAILIDS_AFTER Compiled (with warnings)
>
> Project: /home/tom/.sqldeveloper/system/...
> TRIGGER MOTHRA.TRIGGER_MAILIDS_AFTER_at_mothra_production
> Warning(28,7): PLW-06002: Unreachable code
>

From the docs:
# A trigger fired by an INSERT statement has meaningful access to new column values only. Because the row is being created by the INSERT, the old values are null.
# A trigger fired by an UPDATE statement has access to both old and new column values for both BEFORE and AFTER row triggers. # A trigger fired by a DELETE statement has meaningful access to :old column values only. Because the row no longer exists after the row is deleted, the :new values are NULL. However, you cannot modify :new values: ORA-4084 is raised if you try to modify :new values.

The posted trigger is for all of update, delete, insert. What happens if you remove INSERT and DELETE from the trigger?

-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Nov 27 2007 - 18:06:51 CST

Original text of this message

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