Trigger insert on parent table question
From: Sean <SeanMartinFarrell_at_gmail.com>
Date: 4 Feb 2005 07:44:23 -0800
Message-ID: <5d1f9da1.0502040744.4c50d975_at_posting.google.com>
Hey all, I'm new to triggers and I don't know if what I want is possible.
Date: 4 Feb 2005 07:44:23 -0800
Message-ID: <5d1f9da1.0502040744.4c50d975_at_posting.google.com>
Hey all, I'm new to triggers and I don't know if what I want is possible.
I have a parent table, dbobjects say. And I have a persons table.
bdobjects.id is a primary key
persons.id is a primary key and references dbobjecs.id.
Descriptively what I want is:
Before insert on persons
Insert a row in the dbobjects table *sys_guid() is default for this
column*
Iake the value of the new dbojects.id field and assign it to the
persons.id field of the row about to be inserted
Continue with persons insert
Can this be done? Oracle 10g BTW.
Thanks so much Received on Fri Feb 04 2005 - 16:44:23 CET