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: Easy Question ( I hope)

Re: Easy Question ( I hope)

From: Andrew Pahomov <Pahomov_at_validio.com.ua>
Date: Thu, 9 Nov 2000 23:00:06 +0200
Message-ID: <3a0bb877$1@miik2-ilt.ilt.kharkov.ua>

PRAGMA AUTONOMOUS_TRANSACTION allow commit in triggers.

Marek Jó+wik <mjozwik_at_wonlok.com.pl> wrote in message news:8ug4lv$c0s$1_at_kujawiak.man.lodz.pl...
> > I know that you can't commit in triggers, so If I want to create a
> > parent key row before creating a child row, what is the best way to do
> > that? Should I have the before insert trigger run a stored procedure?
>
> Assume that table A is parent of table B.
>
> You can set foreign key on
> table B as DEFERRABLE INITIALLY DEFERRED.
>
> So, first you can insert row into table B and then into table A.
>
>
Received on Thu Nov 09 2000 - 15:00:06 CST

Original text of this message

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