create table test1(
id number(3),
num varchar2(5),
unique(id)
);
create table test2(
id number(3),
num varchar2(5),
unique(id),
CONSTRAINT test FOREIGN KEY (id) REFERENCES test1 (id) ON DELETE CASCADE
--不知为何不对CONSTRAINT test FOREIGN KEY (id) REFERENCES test1 (id) ON DELETE CASCADE ON UPDATE CASCADE
);
insert into test1 values (1,'123');
insert into test2 values (1,'321');
select * from test1
delete from test1 where id=1