how to? on insert a record to parent > insert to child also [message #36128] |
Tue, 06 November 2001 23:37 |
Paul
Messages: 164 Registered: April 1999
|
Senior Member |
|
|
when i insert a record to t1, it should automatically insert a record in t2 with t2.id = t1.id, and t2.name as null. is it possible to do it with TRIGGERS? or by any other means?
Help me, please.
create table t1
(
id varchar2(8) not null,
title varchar2(4),
constraint id_violation primary key (id)
);
commit;
create table t2
(
id varchar2(8) referencing t1 on delete cascade,
name varchar2(4)
);
commit;
----------------------------------------------------------------------
|
|
|
|
|
|