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: Trigger Question

RE: Trigger Question

From: Jared Still <jkstill_at_cybcon.com>
Date: Thu, 08 Jan 2004 16:59:25 -0800
Message-ID: <F001.005DC2F6.20040108165925@fatcity.com>


Dick, you cannot do that in an AFTER trigger.

Jared

On Thu, 2004-01-08 at 11:54, Goulet, Dick wrote:
> Wolfgang,
>
> Yes you may, within the trigger only, change values of that row only. it's known as
>
> :new.<column_name> := <whatever>;
>
> Dick Goulet
> Senior Oracle DBA
> Oracle Certified 8i DBA
>
> -----Original Message-----
> Sent: Thursday, January 08, 2004 2:39 PM
> To: Multiple recipients of list ORACLE-L
>
>
> I'm sure I will be corrected if I'm wrong.
> Answers inline
>
> At 12:24 PM 1/8/2004, you wrote:
>
> >Hi All,
> >
> >Firstly my apologies if this seems like a very *stupid* question but I'm a
> >tad confused (and it's late in the evening)
> >
> >When an AFTER INSERT trigger is fired (row level) has the row been committed
> >to the database at this stage?
>
> No. You could raise an error as part of what the trigger does in order to
> reject the action.
>
> >If so is it ok to call a package in the trigger that selects that row and
> >changes some values in the row?
>
> a) it is not so and
> b) you can not do anything with that row (or that table for that matter) in
> either the trigger or any called package or procedure. You'll get a
> "mutating table" error.
>
>
> >Thanks,
> >
> >N.
> >
>
> Wolfgang Breitling
> Oracle7, 8, 8i, 9i OCP DBA
> Centrex Consulting Corporation
> http://www.centrexcc.com
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Wolfgang Breitling
> INET: breitliw_at_centrexcc.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Goulet, Dick
> INET: DGoulet_at_vicr.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jared Still
  INET: jkstill_at_cybcon.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Jan 08 2004 - 18:59:25 CST

Original text of this message

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