Re: PL/SQL error?

  • From: "Jared Still" <jkstill@xxxxxxxxx>
  • To: wjwagman@xxxxxxxxxxx
  • Date: Tue, 27 Nov 2007 16:06:51 -0800

On 11/27/07, William Wagman <wjwagman@xxxxxxxxxxx> wrote:
>
>
>   TRIGGER_MAILIDS_AFTER Compiled (with warnings)
>
>   Project: /home/tom/.sqldeveloper/system/...
>     TRIGGER MOTHRA.TRIGGER_MAILIDS_AFTER@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
--
//www.freelists.org/webpage/oracle-l


Other related posts: