Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cascade merge on parent/child

kaericnMay 7 2018 — edited May 7 2018

Dear community. thanks for the help.

Is there a way to do cascade merge on parent/child tables.

create table p

( x int primary key, pname varchar2(100) not null);

create table c

( a int primary key, x references p,

  cname  varchar2(100));

before image:

insert into p ( x,pname) values ( 1,'john');

insert into c(a,x,cname) values (1,1,'johnson1');

insert into c(a,x,cname) values (2,1,'johnson2');

after image:

insert into p ( x,pname) values ( 2,'mary');

insert into c(a,x,cname) values (3,1,'maryson1');

insert into c(a,x,cname) values (4,1,'maryson2');

--select * from c

update c set cname = 'mary'||'_'||cname where a = 2

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2018
Added on May 7 2018
16 comments
573 views