–注意要注意删除和更新时要用主键约束的表进行删除和更新,个人建议
alter table Students add constraint FK_delete foreign key (Dno) references Depts (Dno) on delete CASCADE;
alter table Students add constraint FK_update foreign key (Dno) references Depts (Dno) on update CASCADE;