Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Trigger - help!!!

Re: Trigger - help!!!

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 16 Nov 2001 14:40:42 +0100
Message-ID: <tva74g1sa0eh64@corp.supernews.com>

"David Jeyathilak" <david_at_ionideainteractive.com> wrote in message news:3e9566e2.0111160500.442d8b56_at_posting.google.com...
> Hi,
>
> create table1(
> qty number(10),
> id varchar2(5)
> );
>
> I call the following trigger on update/insert on table1. How do I get
> the value of 'id' which was just inserted in table1?
>
> create or replace trigger trgA
> after update or insert on table1
> declare
> cursor c1 is select qty from table1 where id='value of id which was
> just inserted';
> begin
> end;

where id = :new.id

It is not going to work however, because Oracle doesn't allow you to select from a table which is mutating.
Could you please specify what you want to accomplish?

Hth

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Fri Nov 16 2001 - 07:40:42 CST

Original text of this message

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