Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Easy Question ( I hope)
> 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