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: Marek Jó¼wik <mjozwik_at_wonlok.com.pl>
Date: Fri, 10 Nov 2000 07:30:26 +0100
Message-ID: <8ug4lv$c0s$1@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 Fri Nov 10 2000 - 00:30:26 CST

Original text of this message

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