Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: PL/SQL error?
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-lReceived on Tue Nov 27 2007 - 18:06:51 CST
![]() |
![]() |