* Grignon Etienne <egrignon@egrignon.com> [27.02.2003 23:04]:
>
>
> > >
> > > CREATE TRIGGER OnCreateUser
> > > AFTER INSERT
> > > ON users FOR EACH ROW
> > > EXECUTE PROCEDURE CreateUserTrig();
> > >
> > Have you thought of using BEFORE INSERT instead of AFTER INSERT?
>
>
> Well, no, but I want to do it only after the insert because I will use the
> primary key to insert it in an other table, so I have to be sure that it has
> been inserted.
> Could you explain to me why it doesn't work ?
>
It seems to me, that trigger will see a newly created row in case it is
BEFORE INSERT trigger. I've had a case, when I was inserting data into other
tables using the primary key - everything was fine.
Just try a BEFORE INSERT trigger.
--
Victor Yegorov